<h:selectOneMenu id="selectOneMenu" value="#{Bean1.val1}" >
<f:selectItems value="#{Bean1.selectItems}"/>
<a4j:support event="onchange" action="#{Bean1.onSelectOneMenuChange}" reRender="textbox1 , textbox2 , textbox3, textbox4" />
</h:selectOneMenu>
<h:inputText id="textbox1" value="#{Bean1.textbox1}"> </h:inputText>
<h:inputText id="textbox2" value="#{Bean1.textbox2}"> </h:inputText>
<h:inputText id="textbox3" value="#{Bean1.textbox3}"> </h:inputText>
<h:inputText id="textbox4" value="#{Bean1.textbox4}"> </h:inputText>
Bean1.onSelectOneMenuChange()It changes the value of Bean1.textbox1, Bean1.textbox2, Bean1.textbox3and Bean1.textbox4(depending on the selected value (Bean1.val1)). Sometimes it changes all the values of the text field, and sometimes it only changes the value of the text field.
When users change the value in the "selectOneMenu" drop-down list, the JSF structure does not call the phase of the update model values, but calls directly Bean1.onSelectOneMenuChange(). After that, the entire text field is reRender. Since the phase of the values of the update model is not called, the values entered by the user are never set by Bean1, and the original value is displayed in the text box after reRender.
I want to ask:
Bean1.onSelectOneMenuChange()? Bean1.onSelectOneMenuChange() Bean1?
, reRender , Bean1.onSelectOneMenuChange(). . , , . reRender ? ?
:
2 , reRender EL,
<a4j:support event="onchange" action="#{Bean1.onSelectOneMenuChange}" reRender="#{Bean1.reRenderIDList}" /> .
Bean1.onSelectOneMenuChange() Bean1.reRenderIDList , reRender -. Bean1.getRenderIDList() , . , <h:selectOneMenu> , Bean1.getRenderIDList() . , reRender?
?