Here is my layout
<div id="mainPanel">
<div id="padding">
<h:outputText id="text" value="Personal Feed" rendered="#{Profile.renderComment}"/>
</div>
<div id="right">
<h:form>
<p:commandButton value="Update" actionListener="#{bean.toggleComment}" update="text" />
</h:form>
</div>
</div>
When I click the link Update
, which is supposed to toggle the renderComment
boolean on and off, it does not toggle the display of the text Personal Feed
. Now if I put a form around the h:outputText
, and update
the form
instead, then it works. Why is that?