-
1. Re: List vs Set for entity collections?
danielc.roth Sep 23, 2008 9:08 PM (in response to vk101)Funny you mention it at the same time (wll almost) as Dan Allen created this ...
-
2. Re: List vs Set for entity collections?
gjeudy Sep 23, 2008 9:24 PM (in response to vk101)Veer,
I think you hit a problem that all of us hit. It's probably one of the first issues I hit when I started my Seam project.
So until JSF2 I wouldnt hope on a clean solution aside from wrapping your Sets into Lists to keep the UI happy...
-
3. Re: List vs Set for entity collections?
gjeudy Sep 23, 2008 9:31 PM (in response to vk101)Oops, I didn't see the problem you mentioned with your custom facelets.
Can you post your custom facelets? Does it do something equivalent to:
new ArrayList(mySet)
?
-
4. Re: List vs Set for entity collections?
sjmenden Sep 25, 2008 10:57 PM (in response to vk101)There is a nice little hack to get around the Set limitation. EL projections always return a list, So feel free to use Sets in your code, then just use projections in the EL in the xhtml: http://docs.jboss.com/seam/2.0.3.CR1/reference/en-US/html_single/#d0e20068
-
5. Re: List vs Set for entity collections?
gjeudy Sep 25, 2008 11:17 PM (in response to vk101)Nice trick, though I haven't tried to see if it actually works.
At the end there is a mention that neither Facelets or JSP understand this projection syntax. Have you tested it ?
-
6. Re: List vs Set for entity collections?
luxspes Sep 25, 2008 11:51 PM (in response to vk101)Mmmm and I guess this is the kind of problem that @DataModel was supposed to help with? Wouldnt it be nice if seam could include some kind of annotation (like @DataModelPropertyCall) to make this easier?
-
7. Re: List vs Set for entity collections?
vk101 Sep 28, 2008 1:15 AM (in response to vk101)I got the code from this page, which has the code and explains how to expose it as a Facelets function.
It worked in a pretty straightforward way for me, hopefully it works out for you too! Lemme know if it doesn't work, I can try to explain exactly how I did it.