[jboss-user] [JBoss Seam] - Re: Problem using selectOneMenu in jenerating dynamic select

monkeyden do-not-reply at jboss.com
Sun May 13 11:32:24 EDT 2007


In JSF, it is required that the submitted values for select boxes are a subset of the original SelectItems.  In other words, if you have values 1,2,3,4,5 displayed in a select box, the submitted values need to be some subset of 1,2,3,4,5, and any value other than these is invalid.  You have a few options:  

1.  In the value change listener, try to modify the list the receiving selectbox uses  and use immediate=true on it.  I haven't gotten this to work.  JSF doesn't update the values in the component tree for some reason.

2.  Write your own JSF component which consists of two select boxes and two buttons (Add/Remove), something like the Tomahawk component.
http://www.irian.at/myfaces-sandbox/picklist.jsf

3.  Do it strictly client side, parse the values in JavaScript and submit in a hidden field, and parse on the server side.  This is the most distasteful.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4045285#4045285

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4045285



More information about the jboss-user mailing list