You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by hbMailingList <hb...@gmail.com> on 2008/05/22 17:22:41 UTC

Re: NUMBER_OF_VIEWS_IN_SESSION

Hello again :-)

I'd really like to understand this setting, because I'm worried that I'm
missing something fundemental.

I guess another way I can ask the question is: 
- why/when would it be necessary to have more than one view in the session?

Thanks in adv.

hbMailingList wrote:
> 
> Hello, I’m thinking of setting javax.faces.STATE_SAVING_METHOD to
> server...
> 
> I’m wondering what is the right number for NUMBER_OF_VIEWS_IN_SESSION? 
> I'm guessing that the default is 20, and I’m wondering why would I want to
> have more than 1 view in the session?  
> 
> For example,  let’s say I have 5 pages…5 views.  The user can see only one
> view at a time.  So when she moves from page 1 to page 2, why would I need
> the view for page 1, in the session?   Doesn’t the framework recreate the
> view & its component tree once she visits page 1 again?
> 
> My understanding was that if the user navigates to a page and it is not a
> post-back the view is created from scratch.
> 
> I think I’ve misunderstood something, could you please provide me with
> some examples, in which I’d need more than one view in the session.
> 
> Thanks in advance
> 

-- 
View this message in context: http://www.nabble.com/NUMBER_OF_VIEWS_IN_SESSION-tp17364360p17406662.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: NUMBER_OF_VIEWS_IN_SESSION

Posted by Scott O'Bryan <da...@gmail.com>.
Yes and know. Really depends on the complexity of the app. While JSF 
might be able to contruct the view tree, the view state of the previous 
page would not be able to be restored without full client-side state 
saving. By storing multiple copies, not only can the cached view root be 
retrieved, but its view state as well. All by simply knowing the token.


Scott

hbMailingList wrote:
> Thanks Scott, I understand your explanation...but wouldn't the framework
> recreate the view & its component tree if the view isn't there (when we
> resubmit the pervious page)?
>
> Thanks in advance.
>
>
> Scott O'Bryan wrote:
>   
>> This one is easy but not very intuitive.  Lets say you navigate from one 
>> page to another and then hit the back button.  When you then try to 
>> resubmit the previous page, there is no view state corresponding to the 
>> token unless you've saved more then one.
>>
>> This setting allows you to configure how many different tokens are 
>> active at any given time..
>>
>> Scott
>>
>> hbMailingList wrote:
>>     
>>> Hello again :-)
>>>
>>> I'd really like to understand this setting, because I'm worried that I'm
>>> missing something fundemental.
>>>
>>> I guess another way I can ask the question is: 
>>> - why/when would it be necessary to have more than one view in the
>>> session?
>>>
>>> Thanks in adv.
>>>
>>> hbMailingList wrote:
>>>   
>>>       
>>>> Hello, I’m thinking of setting javax.faces.STATE_SAVING_METHOD to
>>>> server...
>>>>
>>>> I’m wondering what is the right number for NUMBER_OF_VIEWS_IN_SESSION? 
>>>> I'm guessing that the default is 20, and I’m wondering why would I want
>>>> to
>>>> have more than 1 view in the session?  
>>>>
>>>> For example,  let’s say I have 5 pages…5 views.  The user can see only
>>>> one
>>>> view at a time.  So when she moves from page 1 to page 2, why would I
>>>> need
>>>> the view for page 1, in the session?   Doesn’t the framework recreate
>>>> the
>>>> view & its component tree once she visits page 1 again?
>>>>
>>>> My understanding was that if the user navigates to a page and it is not
>>>> a
>>>> post-back the view is created from scratch.
>>>>
>>>> I think I’ve misunderstood something, could you please provide me with
>>>> some examples, in which I’d need more than one view in the session.
>>>>
>>>> Thanks in advance
>>>>
>>>>     
>>>>         
>>>   
>>>       
>>
>>     
>
>   


Re: NUMBER_OF_VIEWS_IN_SESSION

Posted by hbMailingList <hb...@gmail.com>.
Thanks Scott, I understand your explanation...but wouldn't the framework
recreate the view & its component tree if the view isn't there (when we
resubmit the pervious page)?

Thanks in advance.


Scott O'Bryan wrote:
> 
> This one is easy but not very intuitive.  Lets say you navigate from one 
> page to another and then hit the back button.  When you then try to 
> resubmit the previous page, there is no view state corresponding to the 
> token unless you've saved more then one.
> 
> This setting allows you to configure how many different tokens are 
> active at any given time..
> 
> Scott
> 
> hbMailingList wrote:
>> Hello again :-)
>>
>> I'd really like to understand this setting, because I'm worried that I'm
>> missing something fundemental.
>>
>> I guess another way I can ask the question is: 
>> - why/when would it be necessary to have more than one view in the
>> session?
>>
>> Thanks in adv.
>>
>> hbMailingList wrote:
>>   
>>> Hello, I’m thinking of setting javax.faces.STATE_SAVING_METHOD to
>>> server...
>>>
>>> I’m wondering what is the right number for NUMBER_OF_VIEWS_IN_SESSION? 
>>> I'm guessing that the default is 20, and I’m wondering why would I want
>>> to
>>> have more than 1 view in the session?  
>>>
>>> For example,  let’s say I have 5 pages…5 views.  The user can see only
>>> one
>>> view at a time.  So when she moves from page 1 to page 2, why would I
>>> need
>>> the view for page 1, in the session?   Doesn’t the framework recreate
>>> the
>>> view & its component tree once she visits page 1 again?
>>>
>>> My understanding was that if the user navigates to a page and it is not
>>> a
>>> post-back the view is created from scratch.
>>>
>>> I think I’ve misunderstood something, could you please provide me with
>>> some examples, in which I’d need more than one view in the session.
>>>
>>> Thanks in advance
>>>
>>>     
>>
>>   
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/NUMBER_OF_VIEWS_IN_SESSION-tp17364360p17411567.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: NUMBER_OF_VIEWS_IN_SESSION

Posted by Scott O'Bryan <da...@gmail.com>.
This one is easy but not very intuitive.  Lets say you navigate from one 
page to another and then hit the back button.  When you then try to 
resubmit the previous page, there is no view state corresponding to the 
token unless you've saved more then one.

This setting allows you to configure how many different tokens are 
active at any given time..

Scott

hbMailingList wrote:
> Hello again :-)
>
> I'd really like to understand this setting, because I'm worried that I'm
> missing something fundemental.
>
> I guess another way I can ask the question is: 
> - why/when would it be necessary to have more than one view in the session?
>
> Thanks in adv.
>
> hbMailingList wrote:
>   
>> Hello, I’m thinking of setting javax.faces.STATE_SAVING_METHOD to
>> server...
>>
>> I’m wondering what is the right number for NUMBER_OF_VIEWS_IN_SESSION? 
>> I'm guessing that the default is 20, and I’m wondering why would I want to
>> have more than 1 view in the session?  
>>
>> For example,  let’s say I have 5 pages…5 views.  The user can see only one
>> view at a time.  So when she moves from page 1 to page 2, why would I need
>> the view for page 1, in the session?   Doesn’t the framework recreate the
>> view & its component tree once she visits page 1 again?
>>
>> My understanding was that if the user navigates to a page and it is not a
>> post-back the view is created from scratch.
>>
>> I think I’ve misunderstood something, could you please provide me with
>> some examples, in which I’d need more than one view in the session.
>>
>> Thanks in advance
>>
>>     
>
>