-
1. Re: Default Right side values of a rich:pickList not getting populated.
iabughosh Jan 23, 2012 3:20 AM (in response to its_me)hello Nid,
ensure that allData (List<SelectItem>) contains at least new SelectItem("test1") and new SelectItem("test2").
hint: if you are using JSF 2 and your select item and label are the same you can replace List<SelectItem> with List<String> and add items like this list.add("test1").
regards.
-
2. Re: Default Right side values of a rich:pickList not getting populated.
its_me Jan 23, 2012 3:44 AM (in response to iabughosh)Thanks Ibrahim. It worked.
-
3. Re: Default Right side values of a rich:pickList not getting populated.
ramarajv.mca May 25, 2013 9:09 AM (in response to its_me)i am also getting same problem i am geting values from left hand sides but not geting values in right sides
<rich:pickList id="programSelect" value="#{circularController.selectedUsersList}"
var="items" sourceCaption="#{msg.available_List}"
targetCaption="#{msg.selected_List}" listHeight="100"
required="true"
requiredMessage="Please select from available list">
<f:selectItems value="#{circularController.usersList}"></f:selectItems>
<rich:column>
<h:outputText value="#{items}"></h:outputText>
</rich:column>
</rich:pickList>
value={circularController.selectedUsersList} it is fetching values from db as a List<String> selectedUsersList;
i dont know where i did wrong please help me
-
4. Re: Default Right side values of a rich:pickList not getting populated.
bleathem May 27, 2013 3:06 PM (in response to ramarajv.mca)Ramaraj, try specifying a converter that can be used to identify when your users are equivalent (using a id or key value for instance).
-
5. Re: Default Right side values of a rich:pickList not getting populated.
sbucknor May 29, 2014 3:40 PM (in response to bleathem)Hi Brian,
I was wondering if you could please help. I am experiencing a similar challenge. When I do something like this in my backing bean it works fine:
private String [] testRight; private String [] testLeft; (with getters and setters)
public void initalizeLeftRightSide2()
{
this.testLeft = new String[5];
this.testRight = new String[2];
testLeft[0] = "module1";
testLeft[1] = "module2";
testLeft[2] = "module3";
testLeft[3] = "module4";
testLeft[4] = "module5";
testRight[0] = "module2";
testRight[1] = "module4";
}
But when I do it with my Module objects the right side does not get populated:
private List<Modules> allModules;
private List<Modules> forSelectedRole;
public void initalizeLeftRightSide3(Long selectedRoleID)
{
this.allModules = modRole.getAllModules();
Roles theRole = modRole.getModuleListByRoleID(selectedRoleID);
this.forSelectedRole = theRole.getModulesLst();
}
My JSF to initialize the pickList is this with a converter implemented:
<rich:pickList value="#{addModuleToRole.forSelectedRole}" sourceCaption="Available Modules" targetCaption="Selected Modules" listWidth="200px" listHeight="200px" >
<f:selectItems value="#{addModuleToRole.allModules}" var="moules" itemValue="#{moules}" itemLabel="#{moules.name}" />
<f:converter converterId="modulesConverter" />
</rich:pickList>
Just to add forSelectedRole is a subset of allModules.
Thanks in advance for any assistance.