• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

STATE_SAVING_METHOD = client

 
Joseph Sweet
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Everyone,

Something is bothering my mind and I just cannot find the answer to it:
When I set javax.faces.STATE_SAVING_METHOD = client.....

Please tell me if I am right:
suppose I start at page A, submitting it and the response is page B. So on page B i have a hidden field that stores the status of the view A.
Then from page B, I keep submitting and the response is page C. So on page C i have a hidden field that stores the status of the views A and B.
Then from page C, I keep submitting and the response is page D....

You get the idea.

So when I get to page Z, i have a HUGE hidden field that includes the whole history of my current session....

Am I right?

If so, isn't it crazy?
[ February 16, 2008: Message edited by: Joseph Sweet ]
 
Ryan Lubke
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually, you're not.

The state for PageA will be valid only for PageA.
When you submit the form, the state is used to reconstruct
PageA, apply the form data, and then navigate to PageB.
PageB's hidden field will only contain data relevant to PageB.
 
Joseph Sweet
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


PageB's hidden field will only contain data relevant to PageB.



In your scenario, what if I were in Page B prior to my visit in Page A? Then When I come back to Page B, this page has no state, because no state of no page is saved on the session (i.e., on the server).
But when I was in Page B on the 1st time, I did change its state to be different than its default state. So where was it saved in your algorithm?
 
Joseph Sweet
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well guys, nobody knows?

[ February 25, 2008: Message edited by: Joseph Sweet ]
 
Ryan Lubke
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Joseph Sweet:


In your scenario, what if I were in Page B prior to my visit in Page A? Then When I come back to Page B, this page has no state, because no state of no page is saved on the session (i.e., on the server).
But when I was in Page B on the 1st time, I did change its state to be different than its default state. So where was it saved in your algorithm?


When you change the state of PageB, then the state change will be present in the saved state of PageB. The saved state of one page has no impact on the saved state of another page.

I'd like to recommend you spend some time reading the specification if state saving is of interest to you.
 
Joseph Sweet
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nice, but why talking about oranges when I ask about apples?
And if the answer is "go read the specification", then there was no reason for websites like this one.
Let's just write a little script that will answer every message with "go read the specification".
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64718
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are many basic concepts that can be grasped by reading the specification. Sites like this exist when the specification is not enough.
 
Joseph Sweet
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And how would you like your egg, sir? Fried of poached?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic