issue with p:selectOneMenu

UI Components for JSF
Post Reply
derek
Posts: 57
Joined: 24 Aug 2010, 00:56
Location: Canada

19 Dec 2011, 20:57

I have a bunch of email address in the format First Last <Email> which I use in a p:selectOneMenu.. but the problem is that primefaces renders the emails as

<label class="ui-selectonemenu-label ui-corner-all">
Derek Knapp
<derek@domain.com></derek@domain.com>
</label>

instead of

<label class="ui-selectonemenu-label ui-corner-all">
Derek Knapp <derek@domain.com>
</label>


here is my code

Code: Select all

<p:selectOneMenu value="#{emailStepTwoController.replyto}">
    <f:selectItem itemLabel="Please Select"/>
    <f:selectItems var="signature" value="#{itracSession.user.signatures}" itemValue="#{signature}" itemLabel="#{signature.name} <#{signature.email}>"/>
    <f:converter converterId="SignatureConverter"/>
</p:selectOneMenu>
PrimeFaces-3.0, Mojarra 2.0.4, GlassFish 3.1

derek
Posts: 57
Joined: 24 Aug 2010, 00:56
Location: Canada

19 Dec 2011, 21:12

Just to clarify, the problem is when using < in the itemLabel

It only happens with the pre-selected item, if you change the value after the initial page load, the email is displayed as expected.
PrimeFaces-3.0, Mojarra 2.0.4, GlassFish 3.1

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 38 guests