Tabnine Logo
SelectItems
Code IndexAdd Tabnine to your IDE (free)

How to use
SelectItems
in
org.metawidget.statically.faces.component.html.widgetbuilder

Best Java code snippets using org.metawidget.statically.faces.component.html.widgetbuilder.SelectItems (Showing top 5 results out of 315)

origin: org.jboss.forge/forge-scaffold-faces

@Override
protected void addSelectItems(HtmlSelectOneMenu select, String valueExpression, Map<String, String> attributes)
{
 // 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);
}
origin: org.jboss.forge.addon/scaffold-faces

@Override
protected void addSelectItems(HtmlSelectOneMenu select, String valueExpression, Map<String, String> attributes)
{
 // 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);
}
origin: org.metawidget.modules/metawidget-all

protected void addSelectItems( HtmlSelectOneMenu select, String valueExpression, Map<String, String> attributes ) {
  // Empty option
  //
  // Note: a 'null' value (rather than an empty String') renders an <f:selectItem/> rather
  // than an <f:selectItem itemValue=""/>. This works out better if the HtmlSelectOneMenu has
  // a converter, because the empty String may not be a compatible value
  if ( WidgetBuilderUtils.needsEmptyLookupItem( attributes ) ) {
    addSelectItem( select, null, null );
  }
  // Add the select items
  SelectItems selectItems = new SelectItems();
  selectItems.putAttribute( "value", valueExpression );
  select.getChildren().add( selectItems );
}
origin: org.jboss.forge/forge-scaffold-faces

/**
* Overrriden to enhance the default f:selectItem widget with more suitable item labels
*/
@Override
protected void addSelectItems( HtmlSelectOneMenu select, String valueExpression, Map<String, String> attributes ) {
 // Empty option
 //
 // Note: a 'null' value (rather than an empty String') renders an <f:selectItem/> rather
 // than an <f:selectItem itemValue=""/>. This works out better if the HtmlSelectOneMenu has
 // a converter, because the empty String may not be a compatible value
 if ( WidgetBuilderUtils.needsEmptyLookupItem( attributes ) ) {
   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 );
}
origin: org.jboss.forge.addon/scaffold-faces

/**
* Overrriden to enhance the default f:selectItem widget with more suitable item labels
*/
@Override
protected void addSelectItems(HtmlSelectOneMenu select, String valueExpression, Map<String, String> attributes)
{
 // Empty option
 //
 // Note: a 'null' value (rather than an empty String') renders an <f:selectItem/> rather
 // than an <f:selectItem itemValue=""/>. This works out better if the HtmlSelectOneMenu has
 // a converter, because the empty String may not be a compatible value
 if (WidgetBuilderUtils.needsEmptyLookupItem(attributes))
 {
   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);
}
org.metawidget.statically.faces.component.html.widgetbuilderSelectItems

Most used methods

  • <init>
  • putAttribute

Popular in Java

  • Running tasks concurrently on multiple threads
  • getSharedPreferences (Context)
  • requestLocationUpdates (LocationManager)
  • compareTo (BigDecimal)
  • String (java.lang)
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • Collectors (java.util.stream)
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now