[
https://issues.apache.org/jira/browse/MYFACES-2342?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12806874#action_12806874
]
Leonardo Uribe commented on MYFACES-2342:
-----------------------------------------
I did some test and it was found that properties returning MethodExpression and
MethodBinding does not need to deal with PartialStateHolder. The properties
changed where:
UICommand.actionExpression
UICommand.actionListener
UIInput.valueChangeListener
UIInput.validator (only the method returning it)
UIViewRoot.beforePhaseListener
UIViewRoot.afterPhaseListener
StateHelper handles by default all properties as StateHolder, so we can use it
directly. It is true FacesListener, Validator, Converter could implement
StateHolder or PartialStateHolder, but the methods previously mentioned does
not store this classes. There exists MethodBinding / MethodExpression classes
that implements StateHolder, but checking its implementations it uses
Serializable in most cases, or are never called from facelets (because
MethodBinding is deprecated).
This methods are never called from facelets:
UICommand.actionListener
UIInput.valueChangeListener
UIInput.validator (only the method returning it)
Instead, methods like UICommand.addActionListener,
UIInput.addValueChangeListener and UIInput.addValidator are used, and the lists
backing this classes handles PartialStateHolder case.
The property @JSFComponent.stateHolder in jsf 2.0 now changes. It now indicate
properties that need to deal with PartialStateHolder interface. One example is
UIOutput.converter.
It was also found that _DeltaList count instances of Serializable or no
StateHolder classes as if it could change the delta. According to the
documentation, if a class (FacesListener) needs to handle state it must
implements StateHolder/PartialStateHolder. Serializable or no StateHolder
instances are consider inmutables. Note that UIOutput.converter takes that into
account that.
> New objects added for new api in UIViewRoot, UIComponent and UIComponentBase
> could be saved and restored
> --------------------------------------------------------------------------------------------------------
>
> Key: MYFACES-2342
> URL: https://issues.apache.org/jira/browse/MYFACES-2342
> Project: MyFaces Core
> Issue Type: Task
> Components: JSR-314
> Reporter: Leonardo Uribe
> Assignee: Leonardo Uribe
>
> The following fields added on jsf 2.0 should be included in
> saveState/restoreState (adding partial support)
> UIViewRoot._viewScope
> UIComponent._systemEventListenerClassMap
> UIComponentBase._behaviorsMap
> I'll check UIComponent hierarchy again for another fields that needs to be
> included on saveState/restoreState methods.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.