|
List Info
Thread: Bookmarking & request state-keeping
|
|
| Bookmarking & request state-keeping |

|
2007-09-21 05:57:31 |
|
Greetings.
I'm using t:saveState to persist bean information on successive requests. However I'd like to address the bookmarking issue and for that, I understand using redirect not only implies a further component tree duplication, but naturally does not keep state from the previous request, despite the usage of t:saveState.
So, I'd like to know what solutions there are to get both of these at the same time: request save stating and bookmarkability.
Francisco Passos
|
| Re: Bookmarking & request
state-keeping |

|
2007-09-21 11:56:30 |
|
Greetings,
I've recently been told of t:saveState's incompatibility with redirect, and it indeed poses a problem. There are some situations where I would like for users to be able to use bookmarks, while maintaining all my pages in request scope with the use of t:saveState.
Altough I can compreend this limitation, I believe there should be some kind of solution or workaround to let us couple these two funcionalities.
Pedro
On 9/21/07,
Francisco Passos < francisco.passos gmail.com">francisco.passos gmail.com> wrote:
Greetings.
I'm using t:saveState to persist bean information on successive requests. However I'd like to address the bookmarking issue and for that, I understand using redirect not only implies a further component tree duplication, but naturally does not keep state from the previous request, despite the usage of t:saveState.
So, I'd like to know what solutions there are to get both of these at the same time: request save stating and bookmarkability.
Francisco Passos
|
| Re: Bookmarking & request
state-keeping |
  Sweden |
2007-09-23 16:11:06 |
The point of t:saveState is to save data about the user's
current
"context". However bookmarks are very simple
things that save just a
URL. You're therefore basically asking the impossible.
Eeither the application has no complex state (therefore has
no need of
t:saveState) or does have complex state (and is therefore
not
representable as a bookmark).
One way around this that does occur to me is to save the
user state as
data in a database table, and encode the appropriate record
key into the
url. You've therefore got a bookmarkable url that has enough
information
to recreate the user context from. It probably isn't
feasable, though,
for a number of reasons:
* when should data be deleted from the database?
* performance will be slow
* need to write a custom ViewHandler to save/restore view
using DB
rather than posted or session data.
Regards,
Simon
On Fri, 2007-09-21 at 17:56 +0100, Pedro Calcao wrote:
> Greetings,
>
> I've recently been told of t:saveState's
incompatibility with
> redirect, and it indeed poses a problem. There are some
situations
> where I would like for users to be able to use
bookmarks, while
> maintaining all my pages in request scope with the use
of
> t:saveState.
>
> Altough I can compreend this limitation, I believe
there should be
> some kind of solution or workaround to let us couple
these two
> funcionalities.
>
> Pedro
>
> On 9/21/07, Francisco Passos <francisco.passos gmail.com> wrote:
> Greetings.
>
> I'm using t:saveState to persist bean
information on
> successive requests. However I'd like to
address the
> bookmarking issue and for that, I understand
using redirect
> not only implies a further component tree
duplication, but
> naturally does not keep state from the previous
request,
> despite the usage of t:saveState.
>
> So, I'd like to know what solutions there are
to get both of
> these at the same time: request save stating
and
> bookmarkability.
>
> Francisco Passos
>
|
|
| Re: Bookmarking & request
state-keeping |

|
2007-09-24 10:15:54 |
|
Thanks for your response Simon.
I reckon your proposed solution is viable in many cases and, although it requires much control on keeping and discarding state, it might be excellent for specific situations.
However in the current situation it is not feasible for performance reasons. What I meant to say is that, even though it is not necessary, I'd like to have bookmarkable pages, since it is in fact a standard in user navigation - or at least in his perception. However, for me to achieve bookmarkability in JSF I have to use a mechanism that breaks request state-keeping.
And I understand why this happens and why it is necessary, however I get the feeling we are still lacking something when we can't have both this standard things side by side.
Thank you, Francisco
On 9/23/07, simon < simon.kitching chello.at" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">simon.kitching chello.at> wrote:
The point of t:saveState is to save data about the user's current "context". However bookmarks are very simple things that save just a URL. You're therefore basically asking the impossible.
Eeither the application has no complex state (therefore has no need of t:saveState) or does have complex state (and is therefore not representable as a bookmark).
One way around this that does occur to me is to save the user state as
data in a database table, and encode the appropriate record key into the url. You've therefore got a bookmarkable url that has enough information to recreate the user context from. It probably isn't feasable, though,
for a number of reasons: * when should data be deleted from the database? * performance will be slow * need to write a custom ViewHandler to save/restore view using DB rather than posted or session data.
Regards,
Simon
On Fri, 2007-09-21 at 17:56 +0100, Pedro Calcao wrote: > Greetings, > > I've recently been told of t:saveState's incompatibility with > redirect, and it indeed poses a problem. There are some situations
> where I would like for users to be able to use bookmarks, while > maintaining all my pages in request scope with the use of > t:saveState. > > Altough I can compreend this limitation, I believe there should be
> some kind of solution or workaround to let us couple these two > funcionalities. > > Pedro > > On 9/21/07, Francisco Passos < francisco.passos gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
francisco.passos gmail.com
> wrote: > Greetings. > > I'm using t:saveState to persist bean information on > successive requests. However I'd like to address the > bookmarking issue and for that, I understand using redirect
> not only implies a further component tree duplication, but > naturally does not keep state from the previous request, > despite the usage of t:saveState. > > So, I'd like to know what solutions there are to get both of
> these at the same time: request save stating and > bookmarkability. > > Francisco Passos >
|
[1-4]
|
|