Skip to content

Instantly share code, notes, and snippets.

@Baztoune
Created November 23, 2012 14:59
Show Gist options
  • Save Baztoune/4136009 to your computer and use it in GitHub Desktop.
Save Baztoune/4136009 to your computer and use it in GitHub Desktop.
Emulate an HTML select optgroup with RichFaces 3.3 (seam is optional, just use <f:selectItems/> and a converter)
<h:selectOneMenu value="#{myObject.value}">
<s:selectItems value="#{app.globalList}" var="_o" label="#{_o.label}" noSelectionLabel="-" />
<f:selectItem itemValue="-1" itemLabel="-------" itemDisabled="true" />
<s:selectItems value="#{app.globalListComplement}" var="_o" label="#{_o.label}" />
<s:convertEntity />
</h:selectOneMenu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment