Hi,
Can I rerender a jsf ui component when a valuechangelistener method is run? The reason i'm asking is that my valuechangelistener method changes the values of the input boxes in the backing bean but they don't seem to be rerender. What happens eventually is that the values that are printed on screen are saved to the backing bean, overriding the values loaded through the valuechangelistener method.
The following doesn't work:
<h:inputText id="inputbox_id" value="#{name}"/>
<h:selectOneMenu valueChangeListener="#{myBean.changeCountryMenu}">
<a4j:support event="onchange" rerender="inputbox_id" action="#{bean.test}>
</h:selectOneMenu>
Notice that bean.test() is never run. (UPDATE: It does, I had a renderResponse()
that skipped it before. The values still do not reRender though)
So the solution I thought of is to rerender the inputbox from the valueChangeListener.
If there is some other better solution i'd be glad to hear...
Thank you! Ben.