jsr344-experts@javaserverfaces-spec-public.java.net

[jsr344-experts] Re: Partial state saving + tree visiting

From: Edward Burns <edward.burns_at_oracle.com>
Date: Thu, 22 Dec 2011 08:24:53 -0800

>>>>> On Tue, 2 Aug 2011 22:54:03 -0500, Leonardo Uribe <lu4242_at_gmail.com> said:

LU> Hi
LU> I have attached a patch for myfaces (2.0.x) here:

LU> https://issues.apache.org/jira/browse/MYFACES-3257

LU> Note the algorithm in some point call processSaveState(), to save a
LU> "branch" and then return VisitResult.REJECT. Additionally, UIViewRoot
LU> is saved at last, because some information is saved there that will be
LU> used later to restore the tree. In practice, this could cause a
LU> slightly different behavior between MyFaces and Mojarra, because both
LU> algorithms do the same in a different way.

LU> It could be good to know:

LU> 1. If the patch proposed comply with the proposed clarification.

Rather than risk making a mistake in interpreting your patch let me
re-state here the resolution I just committed:

M jsf-api/src/main/java/javax/faces/application/Application.java

    mark {get,set}StateManager() as deprecated, pointing to the new
    equivalents.

M jsf-api/src/main/java/javax/faces/application/StateManager.java
M jsf-api/src/main/java/javax/faces/application/StateManagerWrapper.java

    Deprecate these classes, pointing to the new equivalents.

M jsf-api/src/main/java/javax/faces/view/StateManagementStrategy.java

    require the use of the visit API to perform the saving.

This last change is just appending this text to the class javadocs for
StateManagementStrategy.

 * <p class="changed_added_2_2">Implementations must call
 * {_at_link javax.faces.component.UIComponent#visitTree} on the
 * {_at_link javax.faces.component.UIViewRoot} to perform the saving and restoring
 * of the view in the {_at_link #saveView} and {_at_link #restoreView} methods,
 * respectively.
 * </p>

Does that fit with your changes, Leonardo?

LU> 2. If the patch should be applied on 2.0.x or since 2.1.x.

I am only suggesting this change for 2.2. We would have to do a JCP
revision of the spec to backport it to 2.1. Do you want that?

Ed


-- 
| edward.burns_at_oracle.com | office: +1 407 458 0017
| homepage:               | http://ridingthecrest.com/