I have two booleans that controls the render of some components, the problem is that the variables saves there last state until the session expires, i
<f:facet name="footer">
<p:commandButton action="#{personBean.report}" ajax="false" value="Publish"
rendered="#{personBean.reportMode}" icon="ui-icon-check" />
<p:commandButton action="#{personBean.saveEditing}" ajax="false" value="Save"
rendered="#{personBean.editMode}" icon="ui-icon-check" />
</f:facet>
the bean is session scoped and has the following attributes:
@ManagedBean(name = "personBean")
@SessionScoped
public class ReportPerson {
private boolean editMode;
private boolean reportMode;
}
the bean contains these method that changes the values of the booleans:
public String editPerson() {
System.err.println("Edit Missing Person");
editMode = true;
reportMode = false;
return "ReportNewPerson";
}
the problem is that these values remains until the session expires and as a result the components renders incorrectly