I am moving an application from struts to jsf1.2, on jboss 4.2.2 i.e. the Mojarra implementation. I have 2 listboxes in a form with different lists in each. I use javascript to move entries from one listbox to the other before submitting the form. If the list returned on the one listbox contains entries that weren't in the original list provided to that listbox as SelectItem, then jsf throws a validation error.
After looking through the api for UISelectMany and the jsf1.2 spec section 4.1.15.3 it seems that SelectMany will only allow you to return values that were in the original list.
'4.1.15.3 Methods
UISelectMany must provide a specialized validate() method which ensures that any
decoded values are valid options (from the nested UISelectItem and UISelectItems
children).'
Is my reading of this correct or am I doing something wrong. I then took the code from
http://balusc.blogspot.com/2007/09/objects-in-hselectonemenu.html and rewrote it for 2 listboxes with different values in each and got the same validation error.
Thanks for any comments.
[Message sent by forum member 'jrosenbl' (jrosenbl)]
http://forums.java.net/jive/thread.jspa?messageID=350816