I have a managed bean called UserSearchHandler , it has a doSearch method that populates UserSearchHandler.searchResults , which are displayed in a table on the userSearch.xhtml page.
I have another managed bean called UserHandler , it has showUser method, etc.
In the search results table, the username is a link that, when clicked, should show user data on the userView.xhtml page. The table and link are as follows:
<p:dataTable var="user" value="#{userSearchHandler.searchResults" > // ... and so on ... then <h:commandLink value="#{user.firstName}" action="#{userHandler.showUser}"> <f:setPropertyActionListener target="#{userHandler.userIdToShow}" value="#{profile.id}"/> </h:commandLink>
Everything works fine when managed beans are set to session scope.
However, when I change the scope of the beans to request , the search works and the table fills, but when I click on the name link, nothing happens. I put a breakpoint on the userHandler.showUser method, and it never hits if the UserSearchHandler parameter UserSearchHandler set to a query scope.
Can someone explain why this is or what I am doing wrong?
jsf
Robert Hume
source share