Hi,
I'd like to use the picklist with complex objects (i.e. not strings) without explicitly specifying a converter. Like this:
Code: Select all
<p:pickList value="#{employeeController.customersDualList}" var="customer"
itemLabel="#{customer.companyName}" itemValue="#{customer}" />
I have a CustomerConverter class that is annotated with @FacesConverter(forClass = Customer.class). The annotation registers the converter a default converter for Customer/String conversions. In PrimeFaces, however, when a converter is not specified, it tries to cast the Customer object to a String object throwing the following exception:
Code: Select all
com.test.Customer cannot be cast to java.lang.String
Am I missing something, or are default converters not supported in PrimeFaces?
Thanks,
Theo
PrimeFaces 5.2, PrimeFaces Extensions 3.2, OmniFaces 2.1, Glassfish v4.1, Mojarra 2.2.12