1 Reply Latest reply on May 14, 2010 7:50 AM by Nicklas Karlsson

    How to preload picklist?

    deeps p Newbie
      Hi all,
      I am using jboss-seam-2.2.0.GA and ricfaces.In my application I want to preload my piclist with values from backend. My picklist is

      <rich:pickList id="pickuser" copyAllControlLabel="AssignAll"
      copyControlLabel="Assign" removeAllControlLabel="UnAssign All"
      removeControlLabel="UnAssign" listsHeight="200"
      value="#{userRoles.selectedUsers}" >
      <f:selectItems value="#{userRoles.userNameList}" />
      </rich:pickList>

      and the corresponding seam component is :

      @Stateful
      @Scope(ScopeType.SESSION)
      @Name("userRoles")
      public class UserRolesBean implements UserRoles {
      private List<SelectItem> userNameList = new ArrayList<SelectItem>();
      private List selectedUsers = new ArrayList();

      private List<SelectItem> userNameList = new ArrayList<SelectItem>();

      //setters and getters
      }

      I have set the selectedUsers with the list of selected users form backend.But it was not getting displayed on the target list of picklist.

      I have also tried using a converter.But then I gort error converter not found.
      I anyone have any idea please share.

      Thanks,
      Deeps