tags:

views:

104

answers:

1

Hi,

I am experimenting with richfaces and am stuck with the problem of autopopulating a second suggestion/combo box based on selection of a value from the first suggestion/combo box.

Here is my xhmtl excerpt :

<h:outputLabel value="Brand:" for="brand" />
<rich:comboBox id="brand" selectFirstOnUpdate="false" defaultLabel="Enter some value" valueChangeListener="#{wizardBean.changeProduct}">
    <f:selectItems value="#{wizardBean.brandCategory}"/>
    <a4j:support event="onviewactivated" ajaxSingle="true" reRender="product"/>
</rich:comboBox>

<h:outputLabel value="Product:" for="product" />
<rich:comboBox id="product" value="#{wizardBean.product}" >
    <f:selectItems value="#{wizardBean.productList}"/>
</rich:comboBox>

Although the UI displays fine, I am unable to see the ajax request changing the second combobox.

Please help

cheers!

A: 

The only thing immediately apparent to me from the snippet is that you are using onviewactivated , according to the documentation that should be onselect.

http://docs.jboss.org/richfaces/latest_3_3_X/en/devguide/html/rich_comboBox.html

Also, do you have an h:form around those components? that's an easy thing to miss.

shipmaster