On May 2, 2007, at 5/24:45 PM , Mike Davis wrote:

Hi all,

I've been asked to do some work on a Tapestry 3 application
(unfortunately I can't upgrade it!) and I'm struggling with a
DirectLink/session issue. I would like to allow our users to
access certain pages without session, yet still be able to return to
pages that require a session, without losing any stored state.


Yes, this is possible.

Is it possible to create a Tapestry app that allows a user to do the
following?
- open a page that creates and uses a visit object
- click a DirectLink with the stateful flag set to false
- go back to the first page and use the original visit object again


Yup, fine.

Is it correct to say that once a DirectLink is clicked with the
stateful flag set to false, any session data associated with that
user's session is invalidated?



No, that's not the case. If the stateful flag is true, and your user doesn't have a session, or the session was newly created, tapestry will complain. But if you have a session already and you click on a direct link with stateful=false, tapestry will keep on chugging merrily along.

That said, if your page is really supposed to be accessible "stateless", you might consider implementing IExternalPage and using an external link, instead; then you avoid having to worry about statefulness altogether.

Robert

Thanks
Mike Davis

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to