1 Reply Latest reply on Jun 11, 2008 9:37 AM by Ilya Shaikovsky

    UISelectMany : must be of type List or Array (ERROR with <ri

    bilel derouiche Newbie

      Hi

      I have a problem with my <rich:pickList> I can't display the items. When executing the application I got the following error:

      java.lang.IllegalArgumentException: ValueBinding for UISelectMany : must be of type List or Array
       at org.richfaces.utils.PickListUtils.findUISelectManyConverter(PickListUtils.java:59)
       at org.richfaces.utils.PickListUtils.findUISelectManyConverterFailsafe(PickListUtils.java:79)


      as the error message the selectItems is not a List but it is I can't understand!!.
      I transmit to you my backing bean

      @Stateful
      @Name("adminAction")
      @Scope(ScopeType.SESSION)
      public class AdminActionBean implements AdminActionLocal {
      
      @In(required=false)
       private List<String> customersChoice;
      @Out(required=false)
       private List<String> companyNames;
      @Factory("companyNames")
       public void selectCompanyNames(){
       setCompanyNames((List<String>) getEm().createQuery("select c.companyName from Customer c")
       .getResultList());
      
      //getter() and settter......

      my .xhtml page

      <rich:pickList id="customersChoice" value="#{customersChoice}">
       <f:selectItems id="companyNames" value="#{companyNames}" />
       </rich:pickList>


      Have you got any Idea? thanks for help
      regards
      bibou