Package org.araneaframework.uilib.form

Examples of org.araneaframework.uilib.form.FormWidget


 
  /**
   * Creates and adds an editable row from a usual row object.
   */
  protected void addFormRow(Object newRow) throws Exception {
    FormWidget rowForm = new FormWidget();
    String rowFormId = "rowForm" + rowFormCounter++;
    FormRow newEditableRow = new FormRow(formRowHandler.getRowKey(newRow), newRow, rowFormId, rowForm, true);
   
    formRowHandler.initFormRow(newEditableRow, newRow);    
    addWidget(rowFormId, rowForm);
View Full Code Here


    FormRow currentRow = (FormRow) formRows.get(key);   
    formRowHandler.openOrCloseRow(currentRow);
  }
 
  public void resetAddForm() throws Exception {   
    FormWidget addForm = new FormWidget();
    formRowHandler.initAddForm(addForm);
    addWidget("addForm", addForm);  
  }
View Full Code Here

  }
 
  protected void init() throws Exception {
    super.init();
   
    FormWidget addForm = new FormWidget();
    formRowHandler.initAddForm(addForm);
    addWidget("addForm", addForm);   
  }
View Full Code Here

   
  public int before(Writer out) throws Exception {
    super.before(out);
   
    // Get form data   
    FormWidget form = (FormWidget)readAttribute(UiFormTag.FORM_KEY_REQUEST, PageContext.REQUEST_SCOPE);
   
    // Get form element
    formElementViewModel =
      (FormElement.ViewModel) UiWidgetUtil.traverseToSubWidget(form, id)._getViewable().getViewModel();  
      
View Full Code Here

 
  protected int before(Writer out) throws Exception {
    super.before(out);
   
    formViewModel = (FormWidget.ViewModel)readAttribute(UiFormTag.FORM_VIEW_MODEL_KEY_REQUEST, PageContext.REQUEST_SCOPE);
    FormWidget form =
      (FormWidget)UiUtil.readAttribute(pageContext, UiFormTag.FORM_KEY_REQUEST, PageContext.REQUEST_SCOPE);
   
    //In case the tag is in formElement tag
    if (id == null && getAttribute(UiFormElementTag.ID_KEY_REQUEST, PageContext.REQUEST_SCOPE) != null)
      id = (String) getAttribute(UiFormElementTag.ID_KEY_REQUEST, PageContext.REQUEST_SCOPE);
View Full Code Here

   
    // Get form data   
    formScopedFullId = (String)readAttribute(UiFormTag.FORM_SCOPED_FULL_ID_KEY_REQUEST, PageContext.REQUEST_SCOPE);
    formFullId = (String)readAttribute(UiFormTag.FORM_FULL_ID_KEY_REQUEST, PageContext.REQUEST_SCOPE);
    formViewModel = (FormWidget.ViewModel)readAttribute(UiFormTag.FORM_VIEW_MODEL_KEY_REQUEST, PageContext.REQUEST_SCOPE);
    FormWidget form = (FormWidget)readAttribute(UiFormTag.FORM_KEY_REQUEST, PageContext.REQUEST_SCOPE);
   
    //In case the tag is in formElement tag
    if (id == null && getAttribute(UiFormElementTag.ID_KEY_REQUEST, PageContext.REQUEST_SCOPE) != null)
      id = (String) getAttribute(UiFormElementTag.ID_KEY_REQUEST, PageContext.REQUEST_SCOPE);
    if (id == null) throw new UiMissingIdException(this);       
View Full Code Here

   
    // Determine whether form element with that id is valid
   
    // This code actually prevents using validation for non-simple form elements
    // (this may be important because simpleLabel calls this method)
    FormWidget form =
      (FormWidget)UiUtil.readAttribute(pageContext, UiFormTag.FORM_KEY_REQUEST, PageContext.REQUEST_SCOPE);
    FormElement.ViewModel formElementViewModel =
      (FormElement.ViewModel) UiWidgetUtil.traverseToSubWidget(form, elementId)._getViewable().getViewModel();
    boolean isValid = formElementViewModel.isValid();
   
View Full Code Here

   
    if(tagMapping == null)
      throw new JspException("The tag mapping was not found!.");
   
    formViewModel = (FormWidget.ViewModel)readAttribute(UiFormTag.FORM_VIEW_MODEL_KEY_REQUEST, PageContext.REQUEST_SCOPE);
    FormWidget form = (FormWidget)readAttribute(UiFormTag.FORM_KEY_REQUEST, PageContext.REQUEST_SCOPE);
   
    //In case the tag is in formElement tag
    if (id == null && getAttribute(UiFormElementTag.ID_KEY_REQUEST, PageContext.REQUEST_SCOPE) != null)
      id = (String) getAttribute(UiFormElementTag.ID_KEY_REQUEST, PageContext.REQUEST_SCOPE);
    if (id == null) throw new UiMissingIdException(this);
View Full Code Here

   * FormWidget proxy-methods
   */
 
  public void addFilterFormElement(String id, String label, Control control, Data data) {
    if (this.filterForm == null) {
      this.filterForm = new FormWidget();
    }
    try {
      this.filterForm.addElement(id, label, control, data, false);
    } catch (RuntimeException e) {
      throw e;
View Full Code Here

      .addOnClickEventListener(new FilterEventHandler());

      this.filterForm.markBaseState();
    }
    else {
      this.filterForm = new FormWidget();
    }               
   
    //Configuration
   
    Long defaultListSize = (Long) getConfiguration().getEntry(ConfigurationContext.DEFAULT_LIST_ITEMS_ON_PAGE);
View Full Code Here

TOP

Related Classes of org.araneaframework.uilib.form.FormWidget

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.