I need some JSF 2.1.29 advice. I have a bean:
public class PlayerCardBean{
private Integer playerId;
//GET, SET, Other fileds and methods
}
The facelet playerCard.xhtml
for the bean contains <a>
tag for redirecting to another page:
<a href="javascript://"
onclick="openPage('#{request.contextPath}/panels/playerExternalTransactionList.html?playerId=#{playerCardBean.playerId}');">
<h:outputText value="#msgs['playerCard.externalTransactionList.all']}" />
</a>
I need this bean stay alived when the user is on the playerCard.xhtml
as well as we're redirecting from the playerCard.xhtml
to by the link within the <a>
tag.
The view scope is smaller. The bean is going to be destroyed after redirecting.
How can I keep that bean alive when we're redirecting between those two views? By the <a>
tag and probably by the "back"-button in a browser.
I think that storing the fields within a session is not a good idea because they are not a true-session attributes.