Examples of SelectItems


Examples of org.metawidget.statically.faces.component.html.widgetbuilder.SelectItems

   {
      // Add an empty option to select menus on search pages

      addSelectItem(select, null, null);

      SelectItems items = new SelectItems();
      items.putAttribute("value", valueExpression);

      select.getChildren().add(items);
   }
View Full Code Here

Examples of org.metawidget.statically.faces.component.html.widgetbuilder.SelectItems

         addSelectItem(select, null, null);
      }

      // Add the select items

      SelectItems selectItems = new SelectItems();
      selectItems.putAttribute("value", valueExpression);

      // For each item to be displayed, set the label to the reverse primary key value
      if (attributes.containsKey(REVERSE_PRIMARY_KEY))
      {
         selectItems.putAttribute("var", SELECT_ITEM);
         selectItems.putAttribute("itemValue", StaticFacesUtils.wrapExpression(SELECT_ITEM));
         String displayExpression = "forgeview:display(_item)";
         ((BaseStaticXmlWidget) selectItems).putAdditionalNamespaceURI("forgeview", "http://jboss.org/forge/view");
         selectItems.putAttribute("itemLabel", StaticFacesUtils.wrapExpression(displayExpression));
      }

      select.getChildren().add(selectItems);
   }
View Full Code Here

Examples of org.metawidget.statically.faces.component.html.widgetbuilder.SelectItems

   {
      // Add an empty option to select menus on search pages

      addSelectItem(select, null, null);

      SelectItems items = new SelectItems();
      items.putAttribute("value", valueExpression);

      select.getChildren().add(items);
   }
View Full Code Here

Examples of org.metawidget.statically.faces.component.html.widgetbuilder.SelectItems

         addSelectItem( select, null, null );
      }

      // Add the select items

      SelectItems selectItems = new SelectItems();
      selectItems.putAttribute("value", valueExpression);

      // For each item to be displayed, set the label to the reverse primary key value
      if (attributes.containsKey(REVERSE_PRIMARY_KEY))
      {
         selectItems.putAttribute("var", SELECT_ITEM);
         selectItems.putAttribute("itemValue", StaticFacesUtils.wrapExpression(SELECT_ITEM));
         String displayExpression = "forgeview:display(_item)";
         ((BaseStaticXmlWidget) selectItems).putAdditionalNamespaceURI("forgeview", "http://jboss.org/forge/view");
         selectItems.putAttribute("itemLabel", StaticFacesUtils.wrapExpression(displayExpression));
      }

      select.getChildren().add( selectItems );
   }
View Full Code Here

Examples of org.metawidget.statically.faces.component.html.widgetbuilder.SelectItems

         addSelectItem( select, null, null );
      }

      // Add the select items

      SelectItems selectItems = new SelectItems();
      selectItems.putAttribute("value", valueExpression);

      // For each item to be displayed, set the label to the reverse primary key value
      if (attributes.containsKey(REVERSE_PRIMARY_KEY))
      {
         selectItems.putAttribute("var", SELECT_ITEM);
         selectItems.putAttribute("itemValue", StaticFacesUtils.wrapExpression(SELECT_ITEM));
         String displayExpression = "forgeview:display(_item)";
         ((BaseStaticXmlWidget) selectItems).putAdditionalNamespaceURI("forgeview", "http://jboss.org/forge/view");
         selectItems.putAttribute("itemLabel", StaticFacesUtils.wrapExpression(displayExpression));
      }

      select.getChildren().add( selectItems );
   }
View Full Code Here

Examples of org.metawidget.statically.faces.component.html.widgetbuilder.SelectItems

         addSelectItem( select, null, null );
      }

      // Add the select items

      SelectItems selectItems = new SelectItems();
      selectItems.putAttribute("value", valueExpression);

      // For each item to be displayed, set the label to the reverse primary key value
      if (attributes.containsKey(REVERSE_PRIMARY_KEY))
      {
         selectItems.putAttribute("var", SELECT_ITEM);
         selectItems.putAttribute("itemValue", StaticFacesUtils.wrapExpression(SELECT_ITEM));
         String displayExpression = "forgeview:display(_item)";
         ((BaseStaticXmlWidget) selectItems).putAdditionalNamespaceURI("forgeview", "http://jboss.org/forge/view");
         selectItems.putAttribute("itemLabel", StaticFacesUtils.wrapExpression(displayExpression));
      }

      select.getChildren().add( selectItems );
   }
View Full Code Here

Examples of org.metawidget.statically.faces.component.html.widgetbuilder.SelectItems

   {
      // Add an empty option to select menus on search pages

      addSelectItem(select, null, null);

      SelectItems items = new SelectItems();
      items.putAttribute("value", valueExpression);

      select.getChildren().add(items);
   }
View Full Code Here

Examples of org.springframework.springfaces.selectitems.SelectItems

    return Collections.singleton(value).iterator();
  }

  private Iterator<SelectItem> newSelectItemsIterator(final UISelectItems component) {
    final String var = (String) component.getAttributes().get("var");
    SelectItems selectItems = new SelectItems(component.getValue()) {
      @Override
      protected SelectItem convertToSelectItem(final Object value) {
        return FacesUtils.doWithRequestScopeVariable(SelectItemsIterator.this.context, var, value,
            new Callable<SelectItem>() {
              public SelectItem call() throws Exception {
                Map<String, Object> attrs = component.getAttributes();
                Object itemValue = firstNonNullValue(attrs.get("itemValue"), value);
                String itemLabel = getStringValue(firstNonNullValue(attrs.get("itemLabel"), itemValue));
                SelectItem item = new SelectItem(itemValue, itemLabel);
                item.setDescription(getStringValue(attrs.get("itemDescription")));
                item.setEscape(getBooleanValue(attrs.get("itemLabelEscaped")));
                item.setDisabled(getBooleanValue(attrs.get("itemDisabled")));
                item.setNoSelectionOption(getBooleanValue(firstNonNullValue(
                    attrs.get("noSelectionOption"), attrs.get("noSelectionValue"))));
                return item;
              }
            });
      }
    };
    return selectItems.iterator();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.