Hi,

I have two drop-downs in a datalist, i.e., there are several rows, each having two dropdowns and a textbox. On change of the first dropdown, I need to change the select items in the second dropdown and manipulate the textbox (change it to a calendar or dropdown). Now the problem is, since the components are being built dynamically, I have no way of knowing the ID of the first dropdown. Therefore I cannot use something like this in the sandbox:
<h:selectOneMenu value="#{ajaxChildComboBoxBean.selectedCountry}" id="parentCombo">
<f:selectItems value="#{ajaxChildComboBoxBean.countries}"/>
</h:selectOneMenu>

<f:verbatim>
<br/><br/>
</f:verbatim>

<s:ajaxChildComboBox value="#{ajaxChildComboBoxBean.selectedCity}" parentComboBox="parentCombo"
ajaxSelectItemsMethod="#{ajaxChildComboBoxBean.getCitiesOfSelectedCountry}">
<f:selectItems value="#{ajaxChildComboBoxBean.cities}"/>
</s:ajaxChildComboBox>

I was trying to do this manually, change the components in the valuechangelistener but for this I need more information than just the new value. Any way I could pass more than one values in a value change listener? Or use updateactionlistener with selectonemenu to update several backing bean attributes?

Please ask if any more information is required to be able to help.
Please help, this is a show stopper in my application. :(

Thanks in advance,
Regards,
Aneesha




Reply via email to