I set a string and display it on JSF page using <h:outputText>, I have a <a4j:commandButton> and reRender my <h:outputText>.
when user clicks on <a4j:commandButton> the reRender doesn't occur till the process in method called by <a4j:commandButton> finished.
so sometimes there are 2 different string appended, till the process within called method come to end and the new string will be displayed.
How can I reset the value of msg and rerender <h:outputText> immediately?
<a4j:commandButton id="subButton" action="#{myBean.myMethod}" reRender="msg" />
<h:outputText id="msg" rendered="true" value="#{myBean.msg}" />