GET Request when using Server side view state saving does not follow correct 
lifecycle.
---------------------------------------------------------------------------------------

                 Key: MYFACES-1626
                 URL: https://issues.apache.org/jira/browse/MYFACES-1626
             Project: MyFaces Core
          Issue Type: Bug
    Affects Versions: 1.1.4, 1.1.3
            Reporter: Chris Rudd


The lifecycle for a GET request when using Server side state saving is 
inconsistent and seems incorrect when compared to Client side state saving.

When using Client side state saving the flow is a s follows :
   RESTORE_VIEW: Attempts to restore the view, cannot as there is no saved 
state, a new view is created, renderResponse is called
   RENDER_VIEW: The view is rendered and the state saved to the client.

When using Server side state saving the flow is as follows :
Case 1: First time access to a view
   RESTORE_VIEW: Attempts to restore the view, cannot as there is no saved 
state, a new view is created, renderResponse is called
   RENDER_VIEW: The view is rendered and the state saved to the client.

Case 2: Subsequent accesses to a view
   RESTORE_VIEW: Attempts to restore the view, locates the LAST saved state for 
that view and loads it.
   APPLY_REQUEST_VALUES: Attemtps to process postback, none exists as this is a 
GET.
   PROCESS_VALIDATIONS:
   UPDATE_MODEL_VALUES:
   INVOKE_APPLICATION:
   RENDER_VIEW: The view is rendered and the state saved to the client.


Now obviously something must be amis, as based on my understanding of the spec 
both Client and Server side state saving should behave the same with the only 
difference where the state is saved.

Additionally with the current scheme of loading the LAST saves state for the 
view its possible for a new GET request to be returned a "used" view that 
already has some modified view state (i.e. components that save some of their 
own state).


The resolution would be to only restore the view if the jsf_sequence parameter 
exsists, rather than using the LAST sequence saved when it doesnt.
   

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to