Mojarra 2.1
I'm trying to find the place where the javax.faces.ViewState
parameter is decoded into the Map-like structure. In the UIComponent
abstract class, I didn't find a method tied with RestoreView phase accepting the String as a parameter
. The method
public void restoreTransientState(FacesContext context, Object state)
{
boolean forceCreate = (state != null);
TransientStateHelper helper = getTransientStateHelper(forceCreate);
if (helper != null) {
helper.restoreTransientState(context, state);
}
}
as far as I understand accept the already decoded view state and retrieve the state for that particular component saved before.
It depends on the state saving method (server vs client).
In case of client side state saving, the logic to decode the javax.faces.ViewState
request parameter is located in com.sun.faces.renderkit.ClientSideStateHelper#getState()
and subsequently doGetState()
.
In case of server side state saving, the logic to grab and decode the state object from the session using the identifier as represented by javax.faces.ViewState
request parameter is located in com.sun.faces.renderkit.ServerSideStateHelper#getState()
.
Either way, the abstract API is represented by ResponseStateManager#getState()
which is called in StateManagementStrategy#restoreView()
which in turn is called during ViewHandler#restoreView()
. The aforelinked javadocs describe the process elaborately.