You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Timur Evdokimov <ti...@jacum.com> on 2004/09/05 21:56:30 UTC

Stale links and intelligent state recovery

Hello all,

Recently I had a discussion with one PHP programmer. I was describing
Tapestry and wonders that it can do.
But he made one point I couldn't argue with - in PHP application, among
other differences, the fact that user had pressed
'back' button, will not, in most cases, affect the application screen flow.
If for example an user was presented a list of goods with 'order' button
next to each, pressed 'order' once, then went back to list with that nasty
'back' button, then pressed 'order' again next to another product... In PHP
it will still work as user expects - just adding another item to shopping
cart. Tapestry application will, however, throw an exception, because it was
'stale link'. 

So my question is: how do you guys manage this? 

One solution I would foresee is that standard StaleLink page is overridden
with 
    <page name="StaleLink" specification-path="MyStaleLink.page"/>
And then MyStaleLink would contain logic to forward user transparently to
the 'last known good' page.

Is this good? If not, why and what is actually good?

Regards,
Timur


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Stale links and intelligent state recovery

Posted by Norbert Sándor <pr...@hotmail.com>.
You won't have stale links if you use DirectLink. In this case the BACK
button is working happily.
Stale links may occur in case of forms and ActionLinks but these cases can
be solved using ListEdit, FormConditional and friends.

The StaleLink page is not for this. If I see that page I handle it as a bug
in my application.

Norbi

----- Original Message ----- 
From: "Timur Evdokimov" <ti...@jacum.com>
To: "'Tapestry users'" <ta...@jakarta.apache.org>
Sent: Sunday, September 05, 2004 9:56 PM
Subject: Stale links and intelligent state recovery


>
> Hello all,
>
> Recently I had a discussion with one PHP programmer. I was describing
> Tapestry and wonders that it can do.
> But he made one point I couldn't argue with - in PHP application, among
> other differences, the fact that user had pressed
> 'back' button, will not, in most cases, affect the application screen
flow.
> If for example an user was presented a list of goods with 'order' button
> next to each, pressed 'order' once, then went back to list with that nasty
> 'back' button, then pressed 'order' again next to another product... In
PHP
> it will still work as user expects - just adding another item to shopping
> cart. Tapestry application will, however, throw an exception, because it
was
> 'stale link'.
>
> So my question is: how do you guys manage this?
>
> One solution I would foresee is that standard StaleLink page is overridden
> with
>     <page name="StaleLink" specification-path="MyStaleLink.page"/>
> And then MyStaleLink would contain logic to forward user transparently to
> the 'last known good' page.
>
> Is this good? If not, why and what is actually good?
>
> Regards,
> Timur
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org