Well, if there are no forms on the page, but you need to persist it,
I usually just stick the persistKey as an argument to any directlinks on the
form. Then when the directlink invokes, I bootstrap persistence.
As for changing it, I dunno, you'll have to ask Howard. It's a big
problem for me (and apparently you), but I'm hesistant to claim that it's a
universal issue for other users without some more feedback. It's possible
that for what most people (most especially including Howard) are doing with
Tapestry, the OOB persistence model works fine.
--- Pat
> -----Original Message-----
> From: Edward Scanzano [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, August 17, 2005 11:50 AM
> To: Tapestry users
> Subject: RE: Please expand on this
>
> Thanks Patrick for that info.
>
> How does this work if there are no forms on a page?
>
> Will Tapestry ever change this behavior. This seems
> like a really important feature to support in the
> framework. I know HLS was influenced by WebObjects and
> I know it does support this bahavior.
>
> Thanks
> E
>
> --- Patrick Casey <[EMAIL PROTECTED]> wrote:
>
> >
> > What I ended up doing was rolling my own persist
> > layer. The tapestry
> > persist layer persists on the session/page level,
> > which falls apart if you
> > have multiple instances of the same page up e.g.
> >
> > List of Dogs
> > Right Click -> Open in new Window -> Poodle
> > Right Click -> Open in new Window -> Rotwilder
> > Click on poolde form.
> > Name it muffy.
> > Push save.
> >
> > Congrats, your rotwilder is now named muffy.
> >
> > I ended up having to put a hidden keyfield atop
> > each and every one
> > of my edit forms and then bootstrapping the form
> > back based on that key.
> > Intitially I was just stuffing the ID value of
> > whatever was getting edited,
> > but it turns out in practice you usually need to
> > persist more than that e.g.
> > what page do I redirect to *after* a save? The user
> > expects to go back to
> > the list, etc.
> >
> > So what I do is generate a "pesistencecontext"
> > object for each form
> > and then save it in a LRU cache in the session (with
> > a unique key). This key
> > to this context goes out with each edit form on
> > *top* of the form so it
> > rewinds first, and then I rebuild form state in the
> > setPersistKey()
> > function.
> >
> > Sort of awkward to describe, but once you get it in
> > place it works
> > pretty well.
> >
> > --- Pat
> >
> > > -----Original Message-----
> > > From: Edward Scanzano [mailto:[EMAIL PROTECTED]
> > > Sent: Wednesday, August 17, 2005 11:20 AM
> > > To: tapestry-user; [EMAIL PROTECTED]
> > > Subject: Please expand on this
> > >
> > > Hi All (and Dario),
> > >
> > > How am I supposed to access the value of a field
> > on
> > > the form from within the java code if it is not in
> > a
> > > form post?
> > >
> > > I find it hard to believe that when Tapestry
> > persists
> > > the state of a page it does not attach it to an
> > > instance of a page. This makes supporting backing
> > a
> > > real pain and basically my responsibility.
> > >
> > > Do I have this right.
> > >
> > >
> > >
> > >
> > >
> > > This is expected behavior. If your parameters are
> > > persisted, then they
> > > will have the last value they were set to,
> > regarding
> > > of how many
> > > "backs" you perform.
> > >
> > > You need to use Hidden fields to avoid this.
> > >
> > >
> > > On 8/10/05, Edward Scanzano <[EMAIL PROTECTED]>
> > > wrote:
> > > > Hi all,
> > > >
> > > > I have a page when have a number of components
> > that
> > > > are passed parameters which are persisted in the
> > > page.
> > > > This page has an initialization method this is
> > > called
> > > > as follows.
> > > >
> > > > CWorkspace page = (CWorkspace)
> > > > cycle.getPage("CWorkspace");
> > > > page.setup((Container)item,null);
> > > >
> > > > So far, no problem.
> > > >
> > > > The user then performs a click with in one of
> > these
> > > > components and the same page is called on this
> > time
> > > > with a new object passed to the setup method.
> > > >
> > > > So far, no problem.
> > > >
> > > > Now, I back on the browser to the first page and
> > > when
> > > > I click on another link, the components are
> > seeing
> > > the
> > > > data passed to them from the second page. It is
> > as
> > > if
> > > > the page did not have its persistant variables
> > reset
> > > > for page 1. They remain for page 2.
> > > >
> > > > What is causing this and how should I fix it.
> > > >
> > > > Thanks
> > > > E
> > > >
> > > >
> > >
> > >
> > >
> > >
> > >
> >
> ---------------------------------------------------------------------
> > > 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]
> >
> >
>
>
>
>
> ---------------------------------------------------------------------
> 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]