For example:
Code: Select all
<p:commandButton value="#{msg.cancel}" id="cancel"
action="#{MyBean.actionExit}" process="@this"/>
</p:outputPanel>
Code: Select all
public String actionExit(){
FacesContext.getCurrentInstance().getExternalContext().getSessionMap().remove("MyBean");
return "successful_exit";
}
Code: Select all
<navigation-rule>
<from-view-id>/pages/Mypage.xhtml</from-view-id>
.........
<navigation-case>
<from-outcome>successful_exit</from-outcome>
<to-view-id>/pages/Home.xhtml</to-view-id>
</navigation-case>
</navigation-rule>
Awaiting for your answer
Kind regards