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

[jsr372-experts] Re: [1056-flexibleStateSaving] thoughts about state saving

From: manfred riem <manfred.riem_at_oracle.com>
Date: Wed, 24 Sep 2014 13:19:33 -0500

Hi Leonardo,

> Going back to the original topic, in my personal opinion "where the
> views are saved" is a concern on deployment, not something to be done
> by the application developer. It has sense to add it on faces-config.xml,
> but not on the view. What is a concern for the developer is handle
> with the ViewExpiredException in a more intuitive way.
Just to clarify, are you opposed to the stateSavingMethod attribute on
the view?

And what do you mean add it to the faces-config.xml?

Regards,
Manfred

> regards,
>
> Leonardo Uribe
>
> 2014-09-24 11:46 GMT-05:00 Arjan Tijms <arjan.tijms_at_zeef.com
> <mailto:arjan.tijms_at_zeef.com>>:
>
> Hi,
>
> On Wed, Sep 24, 2014 at 6:22 PM, manfred riem
> <manfred.riem_at_oracle.com <mailto:manfred.riem_at_oracle.com>> wrote:
> > Can you go into specific with regards to the attribute you would
> like to
> > see?
>
> Approximately something like:
>
> name:
> stateSavingMethod
>
> allowed values:
> server/client/[null]
>
> Semantics of the values "server" and "client" would be exactly like
> the context param "javax.faces.STATE_SAVING_METHOD", but just per view
> instead of for the entire application. [null] (not defining the
> attribute, or perhaps find a distinct value instead) would use
> whatever method is set globally.
>
> For example:
>
> mypage.xhtml
>
> <f:view stateSavingMethod="client" >
>
> ...
>
> <h:form>
> ...
> </h:form>
>
>
> </f:view>
>
> web.xml
>
> <context-param>
> <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
> <param-value>server</param-value>
> </context-param>
>
> Requesting /mypage.xhtml would cause the state for that view to be
> stored as the value of the hidden input field, despite the "server"
> setting for state saving in web.xml.
>
> Kind regards,
> Arjan
>
>
>
> >
> > Thanks!
> > Manfred
> >
> >
> > On 9/24/14, 10:48 AM, Arjan Tijms wrote:
> >>
> >> Hi there,
> >>
> >> A while ago I created umbrella issue
> >> https://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-1056 that
> >> asked for more flexible state saving in JSF.
> >>
> >> The issue being an umbrella issue actually asks for a couple of
> more
> >> specific things, but all about where state is saved, not how
> state is
> >> saved.
> >>
> >> Perhaps the most important part of the issue is the ability to
> set per
> >> view whether state is saved on the server or the client. Currently
> >> this can only be set globally for the entire application.
> >>
> >> I looked in the RI code a while ago and did some experiments with a
> >> custom build and the per view setting seemed doable. An
> attribute on
> >> f:view would be the most straightforward place to set this I guess.
> >>
> >> I wonder what your thoughts about this are.
> >>
> >> Kind regards,
> >> Arjan Tijms
>
>