File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes JSF Backing bean in session Scope and State_Saving_Method = Client Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "JSF Backing bean in session Scope and State_Saving_Method = Client" Watch "JSF Backing bean in session Scope and State_Saving_Method = Client" New topic
Author

JSF Backing bean in session Scope and State_Saving_Method = Client

Kavitha Govindaraj
Greenhorn

Joined: May 27, 2004
Posts: 28
Hi,

There may be lot of threads on this topic. But i could not find the answer for my scenario
Scenario:
I have a Managed Bean scope set to session.
State Saving method = client.

Question:
1) I know that the state of the page would be stored in Html as hidden field.
Does this include the instance of the backing bean generated on this page as well?.
2) This hidden field javax.faces.ViewState stores only the component tree?.
3) if we set the managed bean scope to session, the instance of the managed bean is saved in httpSession on server?.

I have tried google and no concrete answer for this.
May be I am missing somewhere.

Valid answers with reference would help a lot.

Thanks.


Thanks <br />Kavitha G <br />SCJP
Kavitha Govindaraj
Greenhorn

Joined: May 27, 2004
Posts: 28
Thanks for the response..
I found the answer.

javax.faces.viewState maintains only the component tree with its values.
Example. if a page has a an input text and the value(Field Name="test") user enters for that text is 10, it stores this value.

When the scope of hte managed bean set to session, the values stored in httpSession.

If you try to change the value of "test" in MB to 15, on the response postBack we get only 15. Which implies that the value is restored from MB.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSF Backing bean in session Scope and State_Saving_Method = Client