Another option maybe is to use ajax4jsf and the a4j:support tag to add an onchange event to the first select box that reRenders the second select box. Then just update the sell.categoryChoice list depending on the selection of the sell.assortments value.
Nick -----Original Message----- From: Gert Vanthienen [mailto:[EMAIL PROTECTED] Sent: Thursday, September 21, 2006 2:04 PM To: MyFaces Discussion Subject: Re: Advice L.S., Although I have never used it myself, there appears to be a page in the Wiki on using JavaScript in combination with JSF [1]. In my opinion, you should be able to use the technique mentioned in 'Using javascript and command links to submit a form from a control event' to submit the value for the first listbox and modify the backing bean to hold the correct values for the second listbox in the action method. Hope this helps, Gert Vanthienen [EMAIL PROTECTED] [1] http://wiki.apache.org/myfaces/JavascriptWithJavaServerFaces [EMAIL PROTECTED] wrote: > I have two listboxes, the second is empty. When I select in the > first one an item, I would like to fill the second one. Could someone > give me an eays solution how I can realize this. > > <h:selectManyListbox value="#{sell.assortments}" size="6" > immediate="true" > valueChangeListener="#{sell.assortmentChange}"> > <f:selectItems value="#{sell.assortmentChoice}" /> > </h:selectManyListbox></td> > <td><h:selectManyListbox value="#{sell.categories}" size="6" > > <f:selectItems value="#{sell.categoryChoice}" /> > </h:selectManyListbox> > > > Urs > > >

