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

[jsr372-experts] Re: [JAVASERVERFACES_SPEC_PUBLIC-1056] DISCUSSION - More flexible state saving

From: Leonardo Uribe <leonardo.uribe_at_irian.at>
Date: Wed, 9 Sep 2015 22:44:00 -0500

Hi

I agree with Arjan. The important thing here is provide a
way to define state saving mode per view or per pattern.

Other issue that deserves some attention, related to flexible
state saving is how @ViewScoped beans are saved.

In JSF 2.0, @ViewScoped beans could be saved on the
client and on the server using the global param.

In JSF 2.2 it was specified that @ViewScoped
beans are saved on server (http session), but that causes
a problem in cases where you need to save the bean on the
client (session expiration destroy bean but the view could
be loaded from the client).

Allow define state saving per view or per pattern helps to
clarify this inconsistency. In other words, you want that
views with state saving set to client to be saved fully on
the client, including its @ViewScoped beans.

Sometimes you want to save the view state on the client,
and save the beans on the server (definition of mixed
mode?), or just save on the client the views that has a size
larger than a threshold.

The minimum thing to do in my opinion is fix the problem
with @ViewScoped and state saving per view and pattern.

regards,

Leonardo Uribe

2015-09-01 13:04 GMT-05:00 arjan tijms <arjan.tijms_at_gmail.com>:

> Hi,
>
> I don't really think this issue is too broad. "Improve state" would
> maybe be, but this issue actually just asks to make the state mode
> setting more flexible. It's now only a global setting, and the issue
> asks to give extra options, such as the ability to set it for a URL
> pattern (with the single view being an example of such pattern).
>
> The context is that "state" is one of the most complained about
> aspects of JSF. Sometimes this seems justified, sometimes maybe not
> entirely. Too often people seem to think of terms of "state is bad,
> stateless is good", and following that: "JSF has state, so JSF is
> bad".
>
> While *that* is a really broad issue, although one that would be great
> to discuss separately, 1056 is really a rather narrow aspect of this
> larger topic.
>
> Sure, it can be split into even smaller things like:
>
> * Set state save mode per view
> * Set state save mode per pattern
> * Unify pseudo state save mode "none" (stateless) with modes "server"
> and "client"
> * Make it possible to set "none" globally as well
>
> Still, I think just splitting up in separate issues without any
> context may not necessarily improve matters.
>
> Kind regards,
> Arjan
>
>
>
>
> On Tue, Sep 1, 2015 at 6:39 PM, manfred riem <manfred.riem_at_oracle.com>
> wrote:
> > Hi all,
> >
> > While I understand the general question behind this particular issue I
> would
> > like to close it as "Won't fix" as it is too broad.
> >
> > I would recommend that if we take action in this area we should come up
> with
> > more narrowly defined issues.
> >
> > Please response before 9/8.
> >
> > If no objections, I will take the action mentioned above.
> >
> > Thanks!
> >
> > Kind regards,
> > Manfred Riem
> >
>