Set bean property "onselect" rich:combobox
<rich:comboBox id="combo" width="100px"
value="#{bean.scenarioString}"
suggestionValues="#{bean.scenarios}">
</rich:comboBox>
<a4j:commandButton value="button" action="#{bean.function}"></a4j:comma开发者_如何学JAVAndButton>
When the button is clicked scenarioString is being setted to selected value. But I want to set the scenarioString when the user select the value from combobox. Is this possible ? also if I can call the function after the scenarioString setted. it will be very help full. I try to use a4j:support but sure I have no value to set... I don't know, will the scenarioString be setted when the form is submitted but I try to use combobox in a h:form and try to submit "onselect" but I could't do it.
Update: I realized that my rich:combobox is already in a h:form, the h:form is in a iu:composition template, that I am using it for the page that my combobox in it.<a4j:support event="onselect" >
<f:setPropertyActionListener target="#{bean.scenarioString}}" value="..."/>
</a4j:support>
Techs:JSF 1.2 RichFaces 3.3.3
精彩评论