-
1. Re: Is it possible to set a Set object to value of dataTable
borlander Apr 1, 2008 9:56 AM (in response to mailcl)Hi!
Maybe someone else can tell us how to do this... I also faced this problem (not using SEAM myself though) and looked for a solution in several forums. All i got was "no, dataTables can't handle Sets".
In order to solve it, I wrote an "ELResolver" so that the evaluation of an expression like "#{mySetObject.list}" returned an ArrayList with the elements of the Set.
Kind of extra useless work, I know... but at least I didn't have to rewrite my data model...
Good luck! -
2. Re: Is it possible to set a Set object to value of dataTable
mars1412 Apr 1, 2008 10:06 AM (in response to mailcl)AFAIK this will work with JSF 2.0
in the mean time you could use smth. like this:
http://jroller.com/pmuir/entry/using_sets_in_jsf
or I've seen someone propose to use this:{selectedGroup.roles.toArray}
I haven't tried it: if you test this and it works, please let us know -
3. Re: Is it possible to set a Set object to value of dataTable
borlander Apr 1, 2008 10:50 AM (in response to mailcl)Just tried the ".toArray" syntax, but doesn't seem to work (says "Property 'toArray' not found on type java.util.HashSet")
However, the link you've mentioned is just the easiest solution... so obvious and easy (JSP functions exist for long time ago...) :-)
Thanks!!!!!! -
4. Re: Is it possible to set a Set object to value of dataTable
nbelaevski Apr 1, 2008 3:26 PM (in response to mailcl)Hello,
Almost the same issue: http://jira.jboss.com/jira/browse/RF-2811 -
5. Re: Is it possible to set a Set object to value of dataTable
borlander Apr 2, 2008 2:46 AM (in response to mailcl)Don't really understand what's the problem with Sets... they also implement Collection interface...
... there must be a reason, though.