You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Joris Wijlens <jo...@nxp.com> on 2006/12/14 12:38:59 UTC
selectmany not accepting java.util.Set
Hi,
Why don't selectmany components accept java.util.Set and do they accept
java.util.List?
And what do I have to do if I don't want to change al my sets to lists?
Thanks anyway,
Joris wijlens
Re: selectmany not accepting java.util.Set
Posted by Joris Wijlens <jo...@nxp.com>.
Hi,
Thanks for your answer.
As far as i understand both solutions are read only. Is this correct?
But I am using the set like this:
<t:selectManyCheckbox value="#{domainModelObject.set}">
...
</t:selectManyCheckbox>
I also want to write on the set.
Thanks anyway,
Joris Wijlens
"Matthias Wessendorf" <ma...@apache.org>
Sent by:
mwessendorf@gmail.com
2006-12-15 05:15 PM
Please respond to
"MyFaces Discussion" <us...@myfaces.apache.org>
To
"MyFaces Discussion" <us...@myfaces.apache.org>
cc
Subject
Re: selectmany not accepting java.util.Set
Classification
here is a blog from Adam Winer, jsf eg
http://sfjsf.blogspot.com/2006/03/usings-sets-with-uidata.html
On 12/15/06, Andrew Robinson <an...@gmail.com> wrote:
> Most things do not take Set as an option because many components use
> the index to determine the selection. Sets by definition are
> un-ordered (and even if the underlying set is ordered, a reusable
> component can't take that chance). Lists are supported by almost all
> JSF elements.
>
> If you insist on using sets, 1) you need to garuntee that your set is
> ordered and will not change and 2) use a EL converter like [1]
>
> [1]
http://www.jroller.com/page/mert?entry=settolistpropresolver_for_jsf_el
>
> On 12/14/06, Joris Wijlens <jo...@nxp.com> wrote:
> >
> > Hi,
> >
> > Why don't selectmany components accept java.util.Set and do they
accept
> > java.util.List?
> >
> > And what do I have to do if I don't want to change al my sets to
lists?
> >
> > Thanks anyway,
> >
> > Joris wijlens
>
--
Matthias Wessendorf
http://tinyurl.com/fmywh
further stuff:
blog: http://jroller.com/page/mwessendorf
mail: mwessendorf-at-gmail-dot-com
Re: selectmany not accepting java.util.Set
Posted by Matthias Wessendorf <ma...@apache.org>.
here is a blog from Adam Winer, jsf eg
http://sfjsf.blogspot.com/2006/03/usings-sets-with-uidata.html
On 12/15/06, Andrew Robinson <an...@gmail.com> wrote:
> Most things do not take Set as an option because many components use
> the index to determine the selection. Sets by definition are
> un-ordered (and even if the underlying set is ordered, a reusable
> component can't take that chance). Lists are supported by almost all
> JSF elements.
>
> If you insist on using sets, 1) you need to garuntee that your set is
> ordered and will not change and 2) use a EL converter like [1]
>
> [1] http://www.jroller.com/page/mert?entry=settolistpropresolver_for_jsf_el
>
> On 12/14/06, Joris Wijlens <jo...@nxp.com> wrote:
> >
> > Hi,
> >
> > Why don't selectmany components accept java.util.Set and do they accept
> > java.util.List?
> >
> > And what do I have to do if I don't want to change al my sets to lists?
> >
> > Thanks anyway,
> >
> > Joris wijlens
>
--
Matthias Wessendorf
http://tinyurl.com/fmywh
further stuff:
blog: http://jroller.com/page/mwessendorf
mail: mwessendorf-at-gmail-dot-com
Re: selectmany not accepting java.util.Set
Posted by Andrew Robinson <an...@gmail.com>.
Most things do not take Set as an option because many components use
the index to determine the selection. Sets by definition are
un-ordered (and even if the underlying set is ordered, a reusable
component can't take that chance). Lists are supported by almost all
JSF elements.
If you insist on using sets, 1) you need to garuntee that your set is
ordered and will not change and 2) use a EL converter like [1]
[1] http://www.jroller.com/page/mert?entry=settolistpropresolver_for_jsf_el
On 12/14/06, Joris Wijlens <jo...@nxp.com> wrote:
>
> Hi,
>
> Why don't selectmany components accept java.util.Set and do they accept
> java.util.List?
>
> And what do I have to do if I don't want to change al my sets to lists?
>
> Thanks anyway,
>
> Joris wijlens