Package org.araneaframework.uilib.support

Examples of org.araneaframework.uilib.support.DisplayItem


    hierarchyTest.addElement("myTextarea", "my text area", new TextareaControl(), new StringData(), true);

    //Filling in select control (which is under a composite element)
    FormElement mySelectElement = hierarchyTest.addElement("mySelect", "my drop down", new SelectControl(), new LongData(), true);
    SelectControl mySelect = (SelectControl) mySelectElement.getControl();
    mySelect.addItem(new DisplayItem("1", "one"));
    mySelect.addItem(new DisplayItem("2", "two"));
    mySelect.addItem(new DisplayItem("3", "three"));
    mySelect.addItem(new DisplayItem("4", "four"));

    return testForm;
  }
View Full Code Here


   
    UiStdFormRadioSelectItemLabelTag label = new UiStdFormRadioSelectItemLabelTag();
    UiStdFormRadioSelectItemTag item = new UiStdFormRadioSelectItemTag();
   
    for (Iterator i = viewModel.getSelectItems().iterator(); i.hasNext();) {
      DisplayItem displayItem = (DisplayItem) i.next();
     
      if (labelBefore) writeLabel(label, id, displayItem.getValue());
     
      registerSubtag(item);
     
      item.setId(id);
      item.setValue(displayItem.getValue());
      //item.setEvents(Boolean.toString(events));
      item.setEvents(events ? "true" : "false");
      //item.setValidate(Boolean.toString(validate));
      item.setValidate(validate ? "true" : "false");
      //item.setValidateOnEvent(Boolean.toString(validateOnEvent));
      item.setValidateOnEvent(validateOnEvent ? "true" : "false");
      item.setStyleClass(styleClass);

      if(tabindex != null)
        item.setTabindex(tabindex)
     
      executeStartSubtag(item);
      executeEndTagAndUnregister(item);   
     
      if (!labelBefore) writeLabel(label, id, displayItem.getValue());
     
      if ("horizontal".equals(type)) out.write(" ");
      else if ("vertical".equals(type)) UiUtil.writeStartEndTag(out, "br");
    }
   
View Full Code Here

   
    UiStdFormCheckboxMultiSelectItemLabelTag label = new UiStdFormCheckboxMultiSelectItemLabelTag();
    UiStdFormCheckboxMultiSelectItemTag item = new UiStdFormCheckboxMultiSelectItemTag();
   
    for (Iterator i = viewModel.getSelectItems().iterator(); i.hasNext();) {
      DisplayItem displayItem = (DisplayItem) i.next();
     
      if (labelBefore) writeLabel(label, id, displayItem.getValue());
     
      registerSubtag(item);
     
      item.setId(id);
      item.setValue(displayItem.getValue());
      item.setEvents(events ? "true" : "false");
      item.setValidate(validate ? "true" : "false");
      item.setValidateOnEvent(validateOnEvent ? "true" : "false");
     
      if(updateRegions != null)
        item.setUpdateRegions(updateRegions);
      if(globalUpdateRegions != null)
        item.setGlobalUpdateRegions(globalUpdateRegions);
      item.setStyleClass(styleClass);
     
      if(tabindex != null)
        item.setTabindex(tabindex);       
     
      executeStartSubtag(item);
      executeEndTagAndUnregister(item);
     
      if (!labelBefore) writeLabel(label, id, displayItem.getValue());
     
      if ("horizontal".equals(type))
        out.write(" ");
      else if ("vertical".equals(type))
        UiUtil.writeStartEndTag(out, "br");
View Full Code Here

    UiUtil.writeAttribute(out, "class", getStyleClass());
    UiUtil.writeCloseStartTag(out);
   
    List selectedItems = new ArrayList(viewModel.getSelectItems());
    for (Iterator i = selectedItems.iterator(); i.hasNext();) {
      DisplayItem displayItem = (DisplayItem) i.next();
      if (!viewModel.getValueSet().contains(displayItem.getValue())) i.remove();
    }
   
    for (Iterator i = selectedItems.iterator(); i.hasNext();) {
      DisplayItem displayItem = (DisplayItem) i.next();
     
      UiUtil.writeEscaped(out, displayItem.getDisplayString());
      if (i.hasNext()) writeSeparator(out);
    }
   
    return super.after(out)
  }
View Full Code Here

      UiUtil.writeAttribute(out, "disabled", "true");
    UiUtil.writeAttributes(out, attributes);
    UiUtil.writeCloseStartTag(out);     
   
    for(Iterator i = viewModel.getSelectItems().iterator(); i.hasNext();) {
      DisplayItem item = (DisplayItem)i.next();
      String value = item.getValue();
      String label = item.getDisplayString();
     
      UiUtil.writeOpenStartTag(out, "option");     
      UiUtil.writeAttribute(out, "value", value != null ? value : "");
      if (viewModel.getValueSet().contains(value))
        UiUtil.writeAttribute(out, "selected", "true");
View Full Code Here

TOP

Related Classes of org.araneaframework.uilib.support.DisplayItem

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.