You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Stav <cc...@yahoo.com> on 2003/03/14 20:53:56 UTC

Stale link error when attempting to dynamically add/remove components

Hi,

why do I receive the following error:

---------------error msg------------------

You have clicked on a stale link.

Rewind of form EditProfile/form expected allocated id
#9 to be 'selectBranch', but was 'inputGroup'
(requested by component EditProfile/inputGroup).

This is most likely the result of using your browser's
back button, but can also be an application error.

You may continue by returning to the application's
home page.

---------------end error msg------------------

I receive this error when I attempt to dynamically
remove the inputGroup component and replace it with a
forEach component based on certain conditions.

The inputGroup component is a Palette.

Tapestry version 2.4a4

Ideally I would have liked to just disable this
component again depending on certain conditions, but
from the docs that is apparently not possible.

Thanks in advance for any suggestions.

Cheers,
Stav.



__________________________________________________
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
http://webhosting.yahoo.com

RE: Stale link error when attempting to dynamically add/remove components

Posted by Stav <cc...@yahoo.com>.
Yes I wrap a Palette in one conditional and a forEach
in another conditional.

The conditionals are the complement of each other,
that  is only Palette or the forEach will show at a
time.

Both components display as they should when the
condition says they should.

However the error occurs when the forEach is displayed
and an attempt is made to submit the form.

Thanks again.

--- "Howard M. Lewis Ship" <hl...@attbi.com> wrote:
> What do you mean "remove"?  Do you mean wrap stuff
> in a Conditional?
> 
> When a form submits, it goes through a rehash of the
> original render during
> which each component that rendered originally
> renders again (possibly
> multiple times, because of Foreach).  The rewind
> must exactly match the
> render or you get StaleLink exception.
> 
> I suspect you have a checkbox or other control that
> controls whether you
> include the inputGroup component.
> 
> Store the updated value in an auxiliary property and
> don't apply it to the
> real property until the form's listener is invoked.
> 
> --
> Howard M. Lewis Ship
> Creator, Tapestry: Java Web Components
> http://jakarta.apache.org/proposals/tapestry
> 
> 
> 
> > -----Original Message-----
> > From: Stav [mailto:cclunis@yahoo.com] 
> > Sent: Friday, March 14, 2003 2:54 PM
> > To: Tapestry mailing lists
> > Subject: Stale link error when attempting to
> dynamically 
> > add/remove components
> > 
> > 
> > Hi,
> > 
> > why do I receive the following error:
> > 
> > ---------------error msg------------------
> > 
> > You have clicked on a stale link.
> > 
> > Rewind of form EditProfile/form expected allocated
> id
> > #9 to be 'selectBranch', but was 'inputGroup'
> > (requested by component EditProfile/inputGroup).
> > 
> > This is most likely the result of using your
> browser's
> > back button, but can also be an application error.
> > 
> > You may continue by returning to the application's
> > home page.
> > 
> > ---------------end error msg------------------
> > 
> > I receive this error when I attempt to dynamically
> > remove the inputGroup component and replace it
> with a
> > forEach component based on certain conditions.
> > 
> > The inputGroup component is a Palette.
> > 
> > Tapestry version 2.4a4
> > 
> > Ideally I would have liked to just disable this
> > component again depending on certain conditions,
> but
> > from the docs that is apparently not possible.
> > 
> > Thanks in advance for any suggestions.
> > 
> > Cheers,
> > Stav.
> > 
> > 
> > 
> > __________________________________________________
> > Do you Yahoo!?
> > Yahoo! Web Hosting - establish your business
> online 
> http://webhosting.yahoo.com
> 
>
---------------------------------------------------------------------
> 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
> 


__________________________________________________
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
http://webhosting.yahoo.com

RE: Stale link error when attempting to dynamically add/remove components

Posted by "Howard M. Lewis Ship" <hl...@attbi.com>.
What do you mean "remove"?  Do you mean wrap stuff in a Conditional?

When a form submits, it goes through a rehash of the original render during
which each component that rendered originally renders again (possibly
multiple times, because of Foreach).  The rewind must exactly match the
render or you get StaleLink exception.

I suspect you have a checkbox or other control that controls whether you
include the inputGroup component.

Store the updated value in an auxiliary property and don't apply it to the
real property until the form's listener is invoked.

--
Howard M. Lewis Ship
Creator, Tapestry: Java Web Components
http://jakarta.apache.org/proposals/tapestry



> -----Original Message-----
> From: Stav [mailto:cclunis@yahoo.com] 
> Sent: Friday, March 14, 2003 2:54 PM
> To: Tapestry mailing lists
> Subject: Stale link error when attempting to dynamically 
> add/remove components
> 
> 
> Hi,
> 
> why do I receive the following error:
> 
> ---------------error msg------------------
> 
> You have clicked on a stale link.
> 
> Rewind of form EditProfile/form expected allocated id
> #9 to be 'selectBranch', but was 'inputGroup'
> (requested by component EditProfile/inputGroup).
> 
> This is most likely the result of using your browser's
> back button, but can also be an application error.
> 
> You may continue by returning to the application's
> home page.
> 
> ---------------end error msg------------------
> 
> I receive this error when I attempt to dynamically
> remove the inputGroup component and replace it with a
> forEach component based on certain conditions.
> 
> The inputGroup component is a Palette.
> 
> Tapestry version 2.4a4
> 
> Ideally I would have liked to just disable this
> component again depending on certain conditions, but
> from the docs that is apparently not possible.
> 
> Thanks in advance for any suggestions.
> 
> Cheers,
> Stav.
> 
> 
> 
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Web Hosting - establish your business online 
http://webhosting.yahoo.com

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