Skip to content

Instantly share code, notes, and snippets.

@rbe
Created September 26, 2012 08:48
Show Gist options
  • Save rbe/3786877 to your computer and use it in GitHub Desktop.
Save rbe/3786877 to your computer and use it in GitHub Desktop.
Primefaces selectOneMenu with converter
<p:column id="recipientName" headerText="Recipient" sortBy="#{t.recipient}" filterBy="#{t.recipient}">
<p:cellEditor>
<f:facet name="output">
<h:outputText value="#{t.recipient.firstname} #{t.recipient.lastname}"/>
</f:facet>
<f:facet name="input">
<p:selectOneMenu value="#{t.recipient}" converter="recipient">
<f:selectItem itemLabel="Select One" itemValue=""/>
<f:selectItems value="#{userBean.users}" var="recipient" itemLabel="#{recipient.username}" itemValue="#{recipient.username}"/>
</p:selectOneMenu>
</f:facet>
</p:cellEditor>
</p:column>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment