p:selectOneMenu not working with Enum Type

UI Components for JSF
Post Reply
ppapapetrou
Posts: 11
Joined: 18 Jul 2011, 07:29
Location: Thessaloniki, Greece
Contact:

18 Jul 2011, 07:45

I have the following code in an xhtml page

Code: Select all

           
<p:selectOneMenu id="lostVoteFlagSelect" width="100%"
                          converter="LostVoteEnumConverter"
                          value="#{ManageCitizenActionHandler.citizen.electoralData.lostVoteData.lostVoteFlag}">  
             <f:selectItems value="#{lostVoteFlags}" />  
</p:selectOneMenu> 
where #{ManageCitizenActionHandler.citizen.electoralData.lostVoteData.lostVoteFlag}" is corresponding to a custom Enum Type.

Code: Select all

public enum LostVoteEnum {
    YES,NO,PROBABLY;
}
#{lostVoteFlags} in f:selectItems is filled by the following method

Code: Select all

Arrays.asList(LostVoteEnum.values())
The code of LostVoteEnumConverter is the following

Code: Select all

@RequestScoped
@FacesConverter(value = "LostVoteEnumConverter")
public class LostVoteEnumConverter extends EnumConverter {

        public LostVoteEnumConverter() {
        super(LostVoteEnum.class);
    }
}
but nothing is displayed in p:selectOneMenu


The same code is working fine if I replace p:selectOneMenu with h:selectOneMenu

Regards
Primefaces 3.2.RC1 - Jboss 7.1.0 - Mojarra 2.1.5

Papapetrou P.Patroklos

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

18 Jul 2011, 08:27

Please file an issue.

ppapapetrou
Posts: 11
Joined: 18 Jul 2011, 07:29
Location: Thessaloniki, Greece
Contact:

18 Jul 2011, 09:58

Primefaces 3.2.RC1 - Jboss 7.1.0 - Mojarra 2.1.5

Papapetrou P.Patroklos

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

18 Jul 2011, 12:47

Thanks will be fixed in M3.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 21 guests