You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Geoff Callender <ge...@gmail.com> on 2007/06/03 12:31:08 UTC
Re: Some state related questions - need some advice
Jan Vissers <Jan.Vissers <at> cumquat.nl> writes:
>
> Hi,
>
> I've a couple of application state related questions, and hope somebody
> can give me some advice.
>
> First question: optimal storage of information
> ----------------------------------------------
> I have a page which displays an area where one can enter a search, based
> on five (or more) criteria. I want these criteria to be "saved", so the
> user when return to this page doesn't need to enter the search (al over)
> again. Currently I'm using a page persisted Query Criteria object and am
> wondering whether this is the best way. I've tried using client side
> persistence, but ran into issues on links on that page getting to long
> fairly quickly, and ASO's seem out of the question for this.
>
> Second question: way to release/clear state
> -------------------------------------------
> Reading some documentation on the JBoss Seam framework I was/am quite
> enthousiastic about there notion of 'Conversations'. This enables state to
> be maintained for a couple of related pages, and this state to be cleared
> whenever the specific Conversation has ended. An example of this for
> instance is the 'Conversation' related with a shoppingcart. How would one
> mimic this functionality using Tapestry?
>
> Thanks for any insight,
> Regards,
> -J.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe <at> tapestry.apache.org
> For additional commands, e-mail: users-help <at> tapestry.apache.org
>
>
Hi Jan,
On the second question, the Web Flow examples in JumpStart should give you
some ideas. The only thing it doesn't do is clear the state at the end, but you
could add that in. If you do look at it I'd like to hear your critique.
On the first question, when links become too long you can use FormLinkRenderer
which will transparently switch the submit to a POST instead of a GET. POSTs
don't have the length restriction. It gets used like this:
<jwcid="@xxxLink" renderer="jumpstart.web.commons.page.FormLinkRenderer"/>
It comes from Tapestry's contrib library but the version in JumpStart adds a fix.
Cheers,
Geoff
http://files.doublenegative.com.au/jumpstart/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org