+1 for JSF 2.2 because it using it in it's current form with JSF 2.1 creates warnings in IDEs, and I wouldn't want to see these warnings persist until we get JSF 2.3 out the door.
Details: The feature relies on getTransient/setTransient from UIComponentBase [1] but there is no "transient" attribute defined in the Facelet taglib.xml file, and no such documented property in the VDLDocs for f:view [2] -- that's what causes IDEs to report warnings in XHTML files.
By adding this for JSF 2.2, we can change the VDLDocs (technically part of the Spec right?) so that they reflect the transient attribute.
[1]
http://javaserverfaces.java.net/nonav/docs/2.1/javadocs/javax/faces/component/UIComponentBase.html
[2]
http://javaserverfaces.java.net/nonav/docs/2.1/vdldocs/facelets/f/view.html
On Feb 25, 2013, at 3:37 PM, Edward Burns <edward.burns_at_oracle.com> wrote:
> Hello Volunteers,
>
> You may have seen Manfred Riem's blog entry about stateless JSF. [1] I
> wonder what you think about adding this for 2.2? Here are the spec
> changes we would need for this minimal, yet effective approach.
>
> * Expose existing transient attribute on UIComponent on VDLDoc for
> <f:view>.
>
> The text of the attribute will be based on UIComponent.isTransient():
>
> If true, the component (and therefore the children of the component)
> must not participate in state saving or restoring.
>
> * In section 7.7.2.8 ViewDeclarationLanguage.restoreView(), change the
> text to be the following.
>
> The JSP implementation must:
>
> [include the existing text of the section.]
>
> The Facelet implementation must:
>
> Call ResponseStateManager.isStateless(). If true, take the
> following action (I will put this in English rather than code).
>
> ViewDeclarationLanguage vdl = vdlFactory.getViewDeclarationLanguage(viewId);
> viewRoot = vdl.createView(context, viewId);
> @@ -543,9 +547,9 @@
> ViewDeclarationLanguage vdl = vdlFactory.getViewDeclarationLanguage(viewId);
> viewRoot = vdl.getViewMetadata(context, viewId).createMetadataView(context);
> context.setViewRoot(viewRoot);
>
> and return, otherwise [...include existing text of the section].
>
> * In ResponseStateManager.writeState(), if the UIViewRoot is transient,
> take impl specific action to make it so the call to
> ResponseStateManager.isStateless() during the the next call, from
> ViewDeclarationLanguage.restoreView(), returns true.
>
> * Spec for new method ResponseStateManager.isStateless(). If the
> preceding writeState() was stateless, return true. If the preceding
> writeState() was statefull return false, otherwise throw
> IllegalStateException.
>
> Thanks,
>
> Ed
>
>
> [1] http://weblogs.java.net/blog/mriem/archive/2013/02/08/jsf-going-stateless
>
> --