Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

JSF 2.0: View Scope Problem

843844Feb 18 2010
Hey,

I 'm having trouble using the JSF 2.0 view scope. My application is a search page displaying some search parameters and a list of results. The search parameters are backed by a session scope bean, the results a backed by a request scoped bean and there is some kind of controller bean in request scope, too. Searching and displaying the results works fine.

The second step was some kind of details page to display when clicking on one result element. I have another controller bean for this goal, but when pressing the link the requested action is not performed. I remembered similar problems I had in the past where I put the bean containing the result list into view scope.

But after putting the results bean into view scope searching is not working anymore. You click the search button, the search action is performed. But after successfully storing the results a new results bean is instantiated. An empty one of course.

Now I 'm not sure anymore if I understand the view scope: I have a single page, I search something and the results are displayed on the same page. I cannot believe that request scoped results work fine and view scoped results do not.

Can anyone help me?

Thanks,
Stephan
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 18 2010
Added on Feb 18 2010
0 comments
125 views