Conditional rendering in JSF [duplicate]
This question already has an answer here: Ajax update/render does not work on a component which has rendered attribute 1 answer Hello I have this code to conditionally render components in my page: <h:commandButton action="#{Bean.method()}" value="Submit"> <f:ajax execute="something" render="one two" /> </h:commandButton> <p><h:outputFormat rendered="#{Bean.answer=='one'}" id="one" value="#{messages.one}"/></p> <p><h:outputFormat rendered="#{Bean.answer=='two'}" id="two" value="#{messages.two}"/></p> It gets the answer and renders the component but in order to see it on my page, I need to