Hi,
MyFaces has an excellent approach for this usecase, in form of a
sandbox component.
Have a look at our examples page:
http://example.irian.at/example-sandbox-20060921/home.jsf
It is called "Ajax-enabled combo box".
Should perfectly fit your needs and stuff like changing the second
menu through an onchange event, a post and following a
valueChangeListener can be left out.
cheers,
Gerald
On 9/21/06, [EMAIL PROTECTED] <[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
--
http://www.irian.at
Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German
Professional Support for Apache MyFaces