-
1. Re: h:selectManyCheckbox replaces PersistentBag with Arrays.
pmuir Jul 2, 2007 6:41 AM (in response to gena777)This is well within the contract for JSF - It simply says that the value attribute of the UISelectMany should be an array or List - it doesn't say that it is a PersistentBag.
So, yes, the UISelectMany did replace the collection, as it is allowed to do. The only work around I can see is to deal with this in your code (action method). -
2. Re: h:selectManyCheckbox replaces PersistentBag with Arrays.
fernando_jmt Jul 2, 2007 9:38 AM (in response to gena777)Seems related to this:
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=111149
HTH. -
3. Re: h:selectManyCheckbox replaces PersistentBag with Arrays.
gena777 Jul 3, 2007 6:37 PM (in response to gena777)>This is well within the contract for JSF - It simply says that the value attribute of the UISelectMany should be an array or List - it doesn't say that it is a PersistentBag.
PersistentBag is an implementation of java.util.List and i don't see any need in a replacement of an existing and not empty PersistentBag, especially with an Arrays.ArrayList - which is not a full implementation of the List interface. -
4. Re: h:selectManyCheckbox replaces PersistentBag with Arrays.
pmuir Jul 3, 2007 6:46 PM (in response to gena777)I'm not sure why it replaces it, but thats not really the point - the point is that the JSF spec allows it to do this (it doesn't say - if there is an already existing List, then remove all its elements and add new ones). This may be a flaw in the spec (I'm not sure it is) but we can't address that here and now :(
-
5. Re: h:selectManyCheckbox replaces PersistentBag with Arrays.
jazir1979 Aug 20, 2007 10:33 PM (in response to gena777)
This is causing us troubles too. I can see that the JSF spec allows it, but it's one of those things where the integration between JSF and Hibernate is not SEAMless at all... it should just work, and it just doesn't, so it pollutes our application with code to deal with maintaining the lists.
Very annoying.. :("pete.muir@jboss.org" wrote:
I'm not sure why it replaces it, but thats not really the point - the point is that the JSF spec allows it to do this (it doesn't say - if there is an already existing List, then remove all its elements and add new ones). This may be a flaw in the spec (I'm not sure it is) but we can't address that here and now :( -
6. Re: h:selectManyCheckbox replaces PersistentBag with Arrays.
pmuir Aug 21, 2007 8:13 AM (in response to gena777)If you can post a patch against the ui example in CVS head to demonstrate this I will take a look and see if we can do something to help in Seam.