Thanks

Something else was being modified and hence it did not work. Works now

Shalini 

-----Original Message-----
From: Shing Hing Man [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 13, 2005 11:47 AM
To: Tapestry users
Subject: Re: AW: Foreach FormSubmit Stale Link Error

> A DirectLink's listener is called before the rewind,

Clicking a  Directlink component does not cause a rewind. Please see p287 TIA. 

 >  <input name="Submit" type="submit" class="button"
> value="Save"
> > jwcid="SaveButton"/>
> >  <input name="Button" type="button" class="button"
> value="Cancel"
> > jwcid="CancelButton"/>


If the saveButton and cancelButton have an IActionListerner, make sure the 
conidition 

  processMetricsStandard.processMetricId

is not changed in the IActionListerner
method.  Only change the state of
processMetricsStandard.processMetricId in the form listener method (then the 
rewinding would have been
done.)
You can use the Submit component parameters selected and tag to indicate which 
button has been pressed.
The ToDo example in chapter 3 of TIA has more details.

Shing
 




 

--- Saqib Rasul <[EMAIL PROTECTED]> wrote:

> When submitting a form, do not use a listener for the DirectLink. Use 
> the tag/selected approach and do the work in the listener for the 
> Form's listener method.
> 
> A DirectLink's listener is called before the rewind, so that upsets 
> the order components that Tapestry expects to see on the page and so 
> you get a Stale Link.
> 
> Regards,
> 
> Saqib
> 
> http://galaxy.sagadc.com/
> - Web Services in 15 Minutes -
> 
> > -----Urspr�ngliche Nachricht-----
> > Von: Shalini Seth [mailto:[EMAIL PROTECTED]
> > Gesendet: Friday, 13 May 2005 3:16 AM
> > An: Tapestry users
> > Betreff: Foreach FormSubmit Stale Link Error
> > 
> > Hi,
> > 
> > I am extracting data from 2 tables. The first is
> the parent and the
> > second child. The child may or may not have
> records.
> > If there are no children the code works fine, but
> if there are children
> > it gives a stale link error.
> > 
> > You have clicked on a stale link.
> > 
> > Rewind of form
> >
>
ProcessRef/ProcessMetricsBlock.ProcessMetricstdNew.processMetricsNew
> > expected allocated id #6 to be
> 'BenchmarkNameField', but was
> > 'SaveButton'
> > 
> > 
> > 
> > I am pasting the html file. Any help or
> suggestions would be greatly
> > appreciated
> > 
> > 
> > 
> > <form name="form1" id="form1" method="get"
> > action="processMetricstdNew.html"
> jwcid="[EMAIL PROTECTED]"
> > delegate="ognl:beans.delegate"
> listener="ognl:listeners.save">
> >  <table border="0" cellpadding="0" cellspacing="0"
> class="twocol">
> >   <tr>
> >    <th scope="row"><label jwcid="@FieldLabel"
> >
>
field="ognl:components.ProcessMetricNameField">Metric</label></th>
> >    <th><label jwcid="@FieldLabel"
> > field="ognl:components.ProcessMetricUoMField">Unit
> of
> > Measure</label></th>
> >    <th><label jwcid="@FieldLabel"
> >
>
field="ognl:components.ProcessMetricStandardField">Standard</label></th>
> >    <th><label jwcid="@FieldLabel"
> >
>
field="ognl:components.ProcessMetricTargetField">Target</label></th>
> >    <th><label jwcid="@FieldLabel"
> >
>
field="ognl:components.ProcessMetricBaselineField">Baseline</label></th>
> >   </tr>
> >   <tr>
> > 
> >   <td scope="row">
> >    <input name="textfield" type="text"
> jwcid="ProcessMetricNameField"/>
> >   </td>
> >   <td>
> >    <input name="textfield" type="text"
> jwcid="ProcessMetricUoMField"/>
> >   </td>
> >   <td>
> >    <input name="textfield" type="text"
> > jwcid="ProcessMetricStandardField"/>
> >   </td>
> >   <td>
> >    <input name="textfield" type="text"
> > jwcid="ProcessMetricTargetField"/>
> >   </td>
> >   <td>
> >    <input name="textfield" type="text"
> > jwcid="ProcessMetricBaselineField"/>
> >   </td>
> >   </tr>
> >   <tr>
> >    <th>&nbsp;</th>
> >    <td scope="row" style="padding:0;">&nbsp;</td>
> >    <td colspan="4" style="padding:0;" scope="row">
> >    <table width="100%" border="0" cellpadding="0"
> cellspacing="0"
> > class="dataDisplayNested">
> >    <tr>
> >    <th scope="col">
> >     <div align="left"><label jwcid="@FieldLabel"
> >
>
field="ognl:components.BenchmarkNameField">Benchmark</label></div>
> >    </th>
> >    <th scope="col">
> >     <div align="left"><label jwcid="@FieldLabel"
> >
>
field="ognl:components.BenchmarkValueField">benchmarkValue</label></div>
> >    </th>
> >    <th scope="col">&nbsp;</th>
> >    </tr>
> >    <span jwcid="@Conditional"
> >
>
condition="ognl:processMetricsStandard.processMetricId
> != null">
> >    <span jwcid="@Any"
> >
>
source="ognl:processBenchmarks(processMetricsStandard)"
> > value="ognl:processBenchmarksSet"/>
> >    <span jwcid="[EMAIL PROTECTED]"
> source="ognl:processBenchmarksSet"
> > value="ognl:processMetricsBenchmark" element="tr">
> >    <td>
> >     <input name="textfield" type="text"
> jwcid="BenchmarkNameField"/>
> >    </td>
> >    <td>
> >     <input name="textfield" type="text"
> jwcid="BenchmarkValueField"/>
> >    </td>
> >    <td>
> >     <a jwcid="@DirectLink"
> listener="ognl:listeners.deleteSubmit"
> > parameters="ognl:processMetricsBenchmark">
> >        <span jwcid="@Image"
> image="ognl:assets.deleteImage"/>
> >    </a>
> > 
> >      <img jwcid="@Image"
> image="ognl:assets.saveImage"
> > listener="ognl:listeners.addSubmit" alt="Add
> benchmark" width="14"
> > height="14"/>-->
> >    </td>
> >    </span>
> >    </span>
> >    </table>
> >    </td>
> >   </tr>
> >  </table>
> > 
> >  <input name="Submit" type="submit" class="button"
> value="Save"
> > jwcid="SaveButton"/>
> >  <input name="Button" type="button" class="button"
> value="Cancel"
> > jwcid="CancelButton"/>
> > 
> > </form>
> > 
> > 
> > 
> > Thanks
> > 
> > Shalini
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 


Home page :
  http://uk.geocities.com/matmsh/index.html


        
        
                
___________________________________________________________
Yahoo! Messenger - want a free and easy way to contact your friends online? 
http://uk.messenger.yahoo.com

---------------------------------------------------------------------
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