Codota Logo
SelectItems.putAttribute
Code IndexAdd Codota to your IDE (free)

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

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

  • Common ways to obtain SelectItems
private void myMethod () {
SelectItems s =
  • Codota Iconnew SelectItems()
  • Smart code suggestions by Codota
}
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.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);
}
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 );
}
org.metawidget.statically.faces.component.html.widgetbuilderSelectItemsputAttribute

Popular methods of SelectItems

  • <init>

Popular in Java

  • Reactive rest calls using spring rest template
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • findViewById (Activity)
  • setRequestProperty (URLConnection)
    Sets the general request property. If a property with the key already exists, overwrite its value wi
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • Reference (javax.naming)
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now