You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Jan Bols <ja...@ivpv.ugent.be> on 2005/06/01 15:43:15 UTC
SelectItems only renders SelectItemGroup objects and not SelectItem objects inside
I have a form like the following:
<h:form>
<h:selectManyCheckbox>
<f:selectItems value="#{test.items1}"/>
</h:selectManyCheckbox>
</h:form>
The test.items1 is an ArrayList with 2 SelectItemGroup objects. Each one
containing 3 SelectItem objects:
public class Test {
private Collection items1;
public Test() {
items1 = new ArrayList(2);
SelectItem options1[] = {
new SelectItem("200", "Duke's Quarterly", ""),
new SelectItem("202", "Duke's Diet and Exercise Journal", ""),
};
SelectItem options2[] = {
new SelectItem("201", "Innovator's Almanac", ""),
new SelectItem("203", "Random Ramblings", ""),
};
SelectItemGroup g1 = new SelectItemGroup("Duke's", null, true, options1);
SelectItemGroup g2 = new SelectItemGroup("General Interest", null,
false, options2);
items1.add(g1);
items1.add(g2);
}
public Collection getItems1() {
return items1;
}
public void setItems1(Collection group1) {
this.items1 = group1;
}
}
When I render this form I see 2 checkboxes with the labels of the
selectItemGroup objects. The SelectItem objects aren't rendered. When I
change selectManyCheckbox to selectManyListBox everything renders OK.
When I change to the JSF RI everything renders OK aswell.
Is this a bug?
I'm using the nightly built myfaces-20050531.
Greetings
Jan
Re: SelectItems only renders SelectItemGroup objects and not SelectItem objects inside
Posted by Jan Bols <ja...@ivpv.ugent.be>.
I added a bugreport in Jira for this at
http://issues.apache.org/jira/browse/MYFACES-267
Greetings
Jan
On Wed, 01 Jun 2005 16:04:27 +0200, Jan Bols <ja...@ivpv.ugent.be> wrote:
> The same is true when I use selectOneRadio instead of selectOneListBox.
> Only the selectItemGroup objects get rendered and not the selectItem
> objects inside the selectItemGroups.
>
> Greetings
> Jan
Re: SelectItems only renders SelectItemGroup objects and not SelectItem objects inside
Posted by Jan Bols <ja...@ivpv.ugent.be>.
The same is true when I use selectOneRadio instead of selectOneListBox.
Only the selectItemGroup objects get rendered and not the selectItem
objects inside the selectItemGroups.
Greetings
Jan