Hoping someone can help me with a small hurdle I encountered regarding re-rendering RichFaces components after the a4j / button link performed this action. A simplified version of my problem is this:
I have two output components displaying a text value that displays based on some value in my manager class:
<h:outputText id="on" value="ON" rendered="#{manager.isOn}" /> <h:outputText id="off" value="OFF" rendered="#{not manager.isOn}" />
I also have 2 a4j links that trigger some action and then redisplay the above outputText components:
<a4j:commandLink ajaxSingle="true" value="Set On" action="#{manager.setOn(true)}" reRender="on,off" /> <a4j:commandLink ajaxSingle="true" value="Set Off" action="#{manager.setOn(false)}" reRender="on,off" />
What I expect will happen when I click the Install On button, the outputText 'ON' component will be displayed, and the "OFF outputText" component will be displayed. However, this does not happen.
Does anyone have an answer why this is so, and how do I redesign these components after the a4j component has completed its operation?
jboss richfaces ajax4jsf seam
Aaron chambers
source share