• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

JSF Backing bean in session Scope and State_Saving_Method = Client

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Kavitha Govindaraj
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic