I have a dataTable like following
<p:dataTable value="#{userTable.tempLists}" var="user"
sortBy="#{user.userId}" sortOrder="descending"
paginator="true"
rows="10" paginatorPosition="bottom">
<p:column headerText="User ID" sortBy="#{user.userId}">
<p:commandLink ajax="false" value="#{user.userId}" action="#{userTable.showDetails(user.userId)}"/>
</p:column>
<p:column headerText="User Name" sortBy="#{user.userName}">
<h:outputText value="#{user.userName}">
</h:outputText>
</p:column>
</p:dataTable>
And I have a panel name as details like following
<p:panel>
<h:outputText value="#{userTable.userId}"/>
<h:outputText value="#{userTable.userName}"/>
</p:panel>
My UserTable managed bean is view scoped. Functionality is like when user will click on commandLink that it will my method will get details of user. After getting details dataTable will hide and panel will be shown. For user it almost seems like a different page.
Problem is here that when user will click any userId(commandLink) he will get details perfectly. Then he can use browser back button and try to get details by clicking another userId. But in this case user is getting same result as previous one. And nothing there in error log.
I found somewhere that in view scope managed bean this problem exist with non-ajax action method. But I need to keep it in viewscoped to maintain table state with sorting and pagination. So whenever user press back button I can show same screen before selection.
Please help. Thanks in advance.