You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Saldy Mathew <sm...@webifyservices.com> on 2003/08/14 17:45:50 UTC

Problem related StaleLink

Hi !

I have an html page in which there are in total 4 Submit buttons.Based on condition either 3 or 1 button will be shown.I have pasted the code snippet below:

While clicking on the Cancel Installation button i receive the following error: Can anyone help me out here.How can this be avoided?

You have clicked on a stale link. 
Rewind of form dar_explorer_s/$Form expected only 3 form elements, but an additional id was requested by component dar_explorer_s/$Submit$2. 
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. 

****************
<div class="rightalign" id="width400">
<span jwcid="@Conditional" condition="ognl:visit.callingPage.equals('onSubmit')">
 <div class="sole_buttons">
  <INPUT jwcid="@Submit" class="button" value="Cancel Installation" listener="ognl:listeners.cancelInstallation"></INPUT>
  <INPUT jwcid="@Submit" class="button" value="Go Back" listener="ognl:listeners.goBack"></INPUT>
  <INPUT jwcid="@Submit" class="button" value="Continue Installation" listener="ognl:listeners.continueSetupPage"></INPUT><!--Changed to "Continue Installation" from "Continue Setup" by Girishk-->
 </div>
</span>
<span jwcid="@Conditional" condition="ognl:!visit.callingPage.equals('onSubmit')">
 <div class="sole_buttons" id="centeralign">
  <input class="button" jwcid="@Submit" listener="ognl:listeners.goToPage" value="Close"/>
 </div>
</span>
</div>
**************
************
public void cancelInstallation(IRequestCycle cycle) {

Visit v = (Visit)getVisit();

v.setCallingPage(IPageConstants.ADMINCONSOLE1_2_1);

cycle.activate(IPageConstants.ADMINCONSOLE1_10);

}

***********

Saldy

Re: Problem related StaleLink

Posted by Marilen Corciovei <le...@nemesisit.rdsnet.ro>.
Hi, on a first view, and without a proper testing this is what I whould
do:

- move the code from the submit button listener to the form listener. I
only use the button listener to set a flag of which operation is to be
done then in the form submit I perform the proper operation based on
that flag. This is because when the listener is called the rewind is not
finished and you do not want to change any condition whule doing that.

Len

On Thu, 2003-08-14 at 18:45, Saldy Mathew wrote:
> Hi !
> 
> I have an html page in which there are in total 4 Submit buttons.Based on condition either 3 or 1 button will be shown.I have pasted the code snippet below:
> 
> While clicking on the Cancel Installation button i receive the following error: Can anyone help me out here.How can this be avoided?
> 
> You have clicked on a stale link. 
> Rewind of form dar_explorer_s/$Form expected only 3 form elements, but an additional id was requested by component dar_explorer_s/$Submit$2. 
> 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. 
> 
> ****************
> <div class="rightalign" id="width400">
> <span jwcid="@Conditional" condition="ognl:visit.callingPage.equals('onSubmit')">
>  <div class="sole_buttons">
>   <INPUT jwcid="@Submit" class="button" value="Cancel Installation" listener="ognl:listeners.cancelInstallation"></INPUT>
>   <INPUT jwcid="@Submit" class="button" value="Go Back" listener="ognl:listeners.goBack"></INPUT>
>   <INPUT jwcid="@Submit" class="button" value="Continue Installation" listener="ognl:listeners.continueSetupPage"></INPUT><!--Changed to "Continue Installation" from "Continue Setup" by Girishk-->
>  </div>
> </span>
> <span jwcid="@Conditional" condition="ognl:!visit.callingPage.equals('onSubmit')">
>  <div class="sole_buttons" id="centeralign">
>   <input class="button" jwcid="@Submit" listener="ognl:listeners.goToPage" value="Close"/>
>  </div>
> </span>
> </div>
> **************
> ************
> public void cancelInstallation(IRequestCycle cycle) {
> 
> Visit v = (Visit)getVisit();
> 
> v.setCallingPage(IPageConstants.ADMINCONSOLE1_2_1);
> 
> cycle.activate(IPageConstants.ADMINCONSOLE1_10);
> 
> }
> 
> ***********
> 
> Saldy