JSF - Updating Model Values in Controller Bean

Posted by Sean on Stack Overflow See other posts from Stack Overflow or by Sean
Published on 2010-05-26T14:29:41Z Indexed on 2010/05/26 14:31 UTC
Read the original article Hit count: 215

Filed under:

I have a Controller bean (SearchController) that has two managed bean as managed properties (SearchCriteria, SearchResults; both of which are session scoped).

When the user hits the find button, the action method that is executed is in SearchController.

The SearchCreteria managed bean has a method called search(). This method returns a new SearchResults object. In the controller bean, I am setting the searchResults managed property to be this new SearchResults object. The searchResults object contains what I expect during that request, but the object does not persist in the managed bean.

I understand that I am changing what object that searchResults is referencing, but what I don't understand is why JSF isn't updating the model to use the new object. Any ideas what I'm missing or don't understand? I am using JSF 1.1 on WebSphere 6.1.

If I put the search method in the SearchResults managed bean, it works.

© Stack Overflow or respective owner

Related posts about jsf