[richfaces-issues] [JBoss JIRA] Resolved: (RF-7034) Missing selected items in pickList
Nick Belaevski (JIRA)
jira-events at lists.jboss.org
Wed May 6 09:48:47 EDT 2009
[ https://jira.jboss.org/jira/browse/RF-7034?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Nick Belaevski resolved RF-7034.
--------------------------------
Resolution: Cannot Reproduce Bug
Assignee: Tsikhon Kuprevich (was: Nick Belaevski)
Page code:
<h:form>
<rich:pickList value="#{forum5Bean.selRoleNames}"
sourceListWidth="200px" targetListWidth="200px">
<f:selectItems value="#{forum5Bean.roleNames}" />
</rich:pickList>
<h:commandButton value="Submit" />
</h:form>
Bean code:
private List<SelectItem> roleNames = new ArrayList<SelectItem>();
private List<String> selRoleNames = new ArrayList<String>();
{
String[] ss = {"1", "2", "3", "4", "5"};
for (String s : ss) {
roleNames.add(new SelectItem(s, "Item " + s));
}
ss = new String[]{"2", "4", "5"};
for (String s : ss) {
selRoleNames.add(s);
}
}
public List<SelectItem> getRoleNames() {
return roleNames;
}
public void setRoleNames(List<SelectItem> roleNames) {
this.roleNames = roleNames;
}
public List<String> getSelRoleNames() {
return selRoleNames;
}
public void setSelRoleNames(List<String> selRoleNames) {
this.selRoleNames = selRoleNames;
}
When submit is clicked nothing changes in picklist items - as should be
> Missing selected items in pickList
> ----------------------------------
>
> Key: RF-7034
> URL: https://jira.jboss.org/jira/browse/RF-7034
> Project: RichFaces
> Issue Type: Bug
> Affects Versions: 3.3.1
> Environment: JDK 1.5.0_11
> JBoss AS 4.2.3.GA
> Seam 2.1.1.GA
> JSF 1.2_09-b01-BETA1
> JSF-Facelets 1.1.15.B1
> Richfaces 3.1.1.CR2
> Reporter: Rainer Flicker
> Assignee: Tsikhon Kuprevich
>
> If a pickList reads selected items from a variable in a backing bean, initial values in the list of selected items are missing
> after a submit. (Works with 3.3.0.GA)
> --- xhtml snippet ---
> <rich:pickList value="#{userDetailsManager.selRoleNames}"
> sourceListWidth="200px" targetListWidth="200px">
> <f:selectItems value="#{userDetailsManager.roleNames}" />
> </rich:pickList>
> ----
> --- userDetailsManager snippet ---
> private List<SelectItem> roleNames = new ArrayList<SelectItem>();
> private List<String> selRoleNames = new ArrayList<String>();
> for (Role role : roles) {
> roleNames.add(new SelectItem(""+role.getId(), role.getName()));
> }
> for (Role role : user.getRoles()) {
> selRoleNames.add("" + role.getId());
> }
> ----
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the richfaces-issues
mailing list