Im am experimenting a bit with JSF, the scenario is the following:
I have a session scoped managed bean
@ManagedBean(name = "rand")
@SessionScoped
where i have declared the following (among other things):
private UIOutput uiOutput;(plus getter and setter)
In my facelets page i have
<h:outputLabel for="userGuess" binding="#{rand.uiOutput}"
value="#{rand.listSize}" rendered="false"/>
there is a button on the page, and on the action method of the button among other things i have
this.uiOutput.setRendered(true);
But it does not seem to work, the element will not be rendered.
If a start it as rendered and change the attribute (setting it true or false) it works. I suspect it has something to do with the fact that the element starting as not rendered is not bound to the uiOutput object i have in my managed bean. How can i make it work in this case?