I used to be a firm believer in that camp as well, but I'm getting a
bit more pragmatic in my old age. Keeping everything in the request can make
for a nightmare of hidden fields and ridiculously long edit links and
whatnot e.g. the "edit this dog" link has to encode:

        EditTarget=Dog
        EditKey=42
        PreviousSource=List
        PreviousTarget=Dogs
        PreviousQuery=Breed%"purebread"
        PreviousSort=Weight
        
        It gets so that I'm passing around huge masses of data with every
query that just feels excessive. That and my life gets annoying if I want to
add a new field e.g.

        PreviousSortDirection=ASC

        So these days I'm using a hybrid between client and server
persistence. Dunno if it's the ideal solution mind you, but it seems to work
for me :).

        -- Pat

> -----Original Message-----
> From: Paul Cantrell [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 18, 2005 10:05 AM
> To: Tapestry users
> Subject: Re: How to edit different data with one page (basically multiple
> "instances" of one page) ?
> 
> The simpler approach may be to not use persistence at all -- make
> everything request-based, and pass values through hidden fields as
> necessary. Trying to make what you're describing work with the
> session is possible, but will be a headache.
> 
> This is a good general strategy. I prefer not to keep things in the
> session unless they really belong there -- e.g. login, locale....
> 
> Cheers,
> 
> Paul
> 
> On Aug 18, 2005, at 10:37 AM, Patrick Casey wrote:
> 
> >
> >     You're going to need to do your own persistence strategy. The
> > simplest solution is just to put the unique key of each invoice in
> > the edit
> > form as a hidden field. If you put it on *top* of the form, then it
> > is set
> > first during the rewind and you can use its being set as a trigger to
> > bootstrap the rest of the invoice out of persistent storage.
> >
> >     --- Pat
> >
> >
> >> -----Original Message-----
> >> From: Petr Sakar [mailto:[EMAIL PROTECTED]
> >> Sent: Thursday, August 18, 2005 9:13 AM
> >> To: tapestry-user@jakarta.apache.org
> >> Subject: How to edit different data with one page (basically multiple
> >> "instances" of one page) ?
> >>
> >> Hello list,
> >> newbie question:
> >>
> >> I have a page with form to edits some data (eg. invoce1). How
> >> shall I do
> >> it to be able to use the same page to edit different data (eg.
> >> invoice2)
> >> at the same time, so I can edit both invoices simultanously ?
> >>
> >> In different words user has two windows opened and works with
> >> both, both
> >> windows are displaying the same page, just displayed data are
> >> diffferent
> >> instance(record) of some class(table). Data are kept in session for
> >> example as invoice1, invoice2.
> >>
> >> Thanx for any ideas.
> >>
> >> saki
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: tapestry-user-
> >> [EMAIL PROTECTED]
> >>
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> 
> _________________________________________________________________
> 
> "I never let my schooling get in the way of my education."
> -- Mark Twain
> 
> 
> 
> ---------------------------------------------------------------------
> 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