You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Roberto Ramírez Vique <ro...@gmail.com> on 2007/01/04 20:06:13 UTC

Problems with components IF & For

Hello everybody!

I am playing with tapestry 4.1.2 and the @EventListener annotation. I am
using tomcat 5.5 and jdk 5.

I have a form, after submit this form using ajax I build a list in the
server side, then I want to show this list in a For component to show all
the found information. But I can't do this simple think, I am always getting
this exception:

You have clicked on a *stale link*.
>
> Rewind of form AddCustomerPage/customerDetailsForm expected allocated id
> #14 to be 'foundCustomersLoop', but was 'editable4' (requested by component
> AddCustomerPage/customerDetailsTable.editable4).
>
> 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
>

To me seems the problem is related with the For component, the other
component editable4 is just an Insert component. I've tried to define
the 'foundCustomersLoop'
in the Java file and in the .jwc, but in both cases I get the same
exception. This is the definition in the java file :

    @Component(type="For", bindings={"source=listCustomersFound",
> "value=currentCustomer"})
>     public abstract IComponent getFoundCustomersLoop();
>


And this is the definition in the .jwc file:

    <component id="foundCustomersLoop" type="For">
>         <binding name="source" value="listCustomersFound"/>
>         <binding name="value" value="currentCustomer"/>
>     </component>
>

Everything is inside a dojo Dialog, but don't know if this affects in any
way.

I've searched this problem in the mailing list and didn't seen anything, I
will really appreciate any hint!
-- 
Robert Ramírez Vique
Computer Science Engineer

Re: Problems with components IF & For

Posted by Roberto Ramírez Vique <ro...@gmail.com>.
Sorry, but now I am testing and I get the correct situation the first time I
execute the ajax, but when I try to execute it again, I get the described
exception.

On 1/4/07, Roberto Ramírez Vique <ro...@gmail.com> wrote:
>
> Hello everybody!
>
> I am playing with tapestry 4.1.2 and the @EventListener annotation. I am
> using tomcat 5.5 and jdk 5.
>
> I have a form, after submit this form using ajax I build a list in the
> server side, then I want to show this list in a For component to show all
> the found information. But I can't do this simple think, I am always getting
> this exception:
>
> You have clicked on a *stale link*.
> >
> > Rewind of form AddCustomerPage/customerDetailsForm expected allocated id
> > #14 to be 'foundCustomersLoop', but was 'editable4' (requested by component
> > AddCustomerPage/customerDetailsTable.editable4).
> >
> > 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
> >
>
> To me seems the problem is related with the For component, the other
> component editable4 is just an Insert component. I've tried to define the 'foundCustomersLoop'
> in the Java file and in the .jwc, but in both cases I get the same
> exception. This is the definition in the java file :
>
>     @Component(type="For", bindings={"source=listCustomersFound",
> > "value=currentCustomer"})
> >     public abstract IComponent getFoundCustomersLoop();
> >
>
>
> And this is the definition in the .jwc file:
>
>     <component id="foundCustomersLoop" type="For">
> >         <binding name="source" value="listCustomersFound"/>
> >         <binding name="value" value="currentCustomer"/>
> >     </component>
> >
>
> Everything is inside a dojo Dialog, but don't know if this affects in any
> way.
>
> I've searched this problem in the mailing list and didn't seen anything, I
> will really appreciate any hint!
> --
> Robert Ramírez Vique
> Computer Science Engineer




-- 
Robert Ramírez Vique
Computer Science Engineer

Re: Problems with components IF & For

Posted by Roberto Ramírez Vique <ro...@gmail.com>.
Firas,

thanks you anyway !!!

Hope anyone else can help me.

robert

On 1/7/07, Firas Adiler <ta...@idigna.com> wrote:
>
> Robert,
>
> Unfortunately I can't be of much help, since I have no experience with
> Ajax-Tapestry.
>
>
> </Firas>
>
>
> -----Original Message-----
> From: Roberto Ramírez Vique [mailto:robertrv@gmail.com]
> Sent: Friday, January 05, 2007 11:30 AM
> To: Tapestry users
> Subject: Re: Problems with components IF & For
>
> Hi Firas!!
>
> thanks for your response !!!
>
> I think this can be a solution, the problem is that what we want is
> exactly
> this. I mean, we want to change the number of elements (in fact populate
> the
> list with the customers found) in this list ... then display this changes.
> I
> thought this was really normal, but I see that maybe is not that normal.
> Do
> you know anyway to solve this problem ?
>
> Thanks you,
>         robert
>
> On 1/5/07, Firas Adiler < tapestry@idigna.com> wrote:
> >
> > Hi Robert,
> >
> > The listCustomersFound must be the same on both rewind and submit.
> > Remember
> > that two List objects (java.util.List) are equal if they contain the
> > same elements in the same order. I suggest that you sort the list
> > before returning it to Tapestry.
> >
> > I believe that was the solution to my problem.
> >
> > Regards,
> >
> > </Firas>
> >
> > -----Original Message-----
> > From: Roberto Ramírez Vique [mailto:robertrv@gmail.com]
> > Sent: Thursday, January 04, 2007 8:06 PM
> > To: Tapestry users
> > Subject: Problems with components IF & For
> >
> > Hello everybody!
> >
> > I am playing with tapestry 4.1.2 and the @EventListener annotation. I
> > am using tomcat 5.5 and jdk 5.
> >
> > I have a form, after submit this form using ajax I build a list in the
> > server side, then I want to show this list in a For component to show
> > all the found information. But I can't do this simple think, I am
> > always getting this exception:
> >
> > You have clicked on a *stale link*.
> > >
> > > Rewind of form AddCustomerPage/customerDetailsForm expected
> > > allocated id
> > > #14 to be 'foundCustomersLoop', but was 'editable4' (requested by
> > > component AddCustomerPage/customerDetailsTable.editable4).
> > >
> > > 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
> > >
> >
> > To me seems the problem is related with the For component, the other
> > component editable4 is just an Insert component. I've tried to define
> > the 'foundCustomersLoop'
> > in the Java file and in the .jwc, but in both cases I get the same
> > exception. This is the definition in the java file :
> >
> >     @Component(type="For", bindings={"source=listCustomersFound",
> > > "value=currentCustomer"})
> > >     public abstract IComponent getFoundCustomersLoop();
> > >
> >
> >
> > And this is the definition in the .jwc file:
> >
> >     <component id="foundCustomersLoop" type="For">
> > >         <binding name="source" value="listCustomersFound"/>
> > >         <binding name="value" value="currentCustomer"/>
> > >     </component>
> > >
> >
> > Everything is inside a dojo Dialog, but don't know if this affects in
> > any way.
> >
> > I've searched this problem in the mailing list and didn't seen
> > anything, I will really appreciate any hint!
> > --
> > Robert Ramírez Vique
> > Computer Science Engineer
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
>
> --
> Robert Ramírez Vique
> Computer Science Engineer
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Robert Ramírez Vique
Computer Science Engineer

RE: Problems with components IF & For

Posted by Firas Adiler <ta...@idigna.com>.
 Robert,

Unfortunately I can't be of much help, since I have no experience with
Ajax-Tapestry.


</Firas>


-----Original Message-----
From: Roberto Ramírez Vique [mailto:robertrv@gmail.com] 
Sent: Friday, January 05, 2007 11:30 AM
To: Tapestry users
Subject: Re: Problems with components IF & For

Hi Firas!!

thanks for your response !!!

I think this can be a solution, the problem is that what we want is exactly
this. I mean, we want to change the number of elements (in fact populate the
list with the customers found) in this list ... then display this changes. I
thought this was really normal, but I see that maybe is not that normal. Do
you know anyway to solve this problem ?

Thanks you,
        robert

On 1/5/07, Firas Adiler < tapestry@idigna.com> wrote:
>
> Hi Robert,
>
> The listCustomersFound must be the same on both rewind and submit.
> Remember
> that two List objects (java.util.List) are equal if they contain the 
> same elements in the same order. I suggest that you sort the list 
> before returning it to Tapestry.
>
> I believe that was the solution to my problem.
>
> Regards,
>
> </Firas>
>
> -----Original Message-----
> From: Roberto Ramírez Vique [mailto:robertrv@gmail.com]
> Sent: Thursday, January 04, 2007 8:06 PM
> To: Tapestry users
> Subject: Problems with components IF & For
>
> Hello everybody!
>
> I am playing with tapestry 4.1.2 and the @EventListener annotation. I 
> am using tomcat 5.5 and jdk 5.
>
> I have a form, after submit this form using ajax I build a list in the 
> server side, then I want to show this list in a For component to show 
> all the found information. But I can't do this simple think, I am 
> always getting this exception:
>
> You have clicked on a *stale link*.
> >
> > Rewind of form AddCustomerPage/customerDetailsForm expected 
> > allocated id
> > #14 to be 'foundCustomersLoop', but was 'editable4' (requested by 
> > component AddCustomerPage/customerDetailsTable.editable4).
> >
> > 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
> >
>
> To me seems the problem is related with the For component, the other 
> component editable4 is just an Insert component. I've tried to define 
> the 'foundCustomersLoop'
> in the Java file and in the .jwc, but in both cases I get the same 
> exception. This is the definition in the java file :
>
>     @Component(type="For", bindings={"source=listCustomersFound",
> > "value=currentCustomer"})
> >     public abstract IComponent getFoundCustomersLoop();
> >
>
>
> And this is the definition in the .jwc file:
>
>     <component id="foundCustomersLoop" type="For">
> >         <binding name="source" value="listCustomersFound"/>
> >         <binding name="value" value="currentCustomer"/>
> >     </component>
> >
>
> Everything is inside a dojo Dialog, but don't know if this affects in 
> any way.
>
> I've searched this problem in the mailing list and didn't seen 
> anything, I will really appreciate any hint!
> --
> Robert Ramírez Vique
> Computer Science Engineer
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


--
Robert Ramírez Vique
Computer Science Engineer


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


Re: Problems with components IF & For

Posted by Roberto Ramírez Vique <ro...@gmail.com>.
Hi Firas!!

thanks for your response !!!

I think this can be a solution, the problem is that what we want is exactly
this. I mean, we want to change the number of elements (in fact populate the
list with the customers found) in this list ... then display this changes. I
thought this was really normal, but I see that maybe is not that normal. Do
you know anyway to solve this problem ?

Thanks you,
        robert

On 1/5/07, Firas Adiler < tapestry@idigna.com> wrote:
>
> Hi Robert,
>
> The listCustomersFound must be the same on both rewind and submit.
> Remember
> that two List objects (java.util.List) are equal if they contain the same
> elements in the same order. I suggest that you sort the list before
> returning it to Tapestry.
>
> I believe that was the solution to my problem.
>
> Regards,
>
> </Firas>
>
> -----Original Message-----
> From: Roberto Ramírez Vique [mailto:robertrv@gmail.com]
> Sent: Thursday, January 04, 2007 8:06 PM
> To: Tapestry users
> Subject: Problems with components IF & For
>
> Hello everybody!
>
> I am playing with tapestry 4.1.2 and the @EventListener annotation. I am
> using tomcat 5.5 and jdk 5.
>
> I have a form, after submit this form using ajax I build a list in the
> server side, then I want to show this list in a For component to show all
> the found information. But I can't do this simple think, I am always
> getting
> this exception:
>
> You have clicked on a *stale link*.
> >
> > Rewind of form AddCustomerPage/customerDetailsForm expected allocated
> > id
> > #14 to be 'foundCustomersLoop', but was 'editable4' (requested by
> > component AddCustomerPage/customerDetailsTable.editable4).
> >
> > 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
> >
>
> To me seems the problem is related with the For component, the other
> component editable4 is just an Insert component. I've tried to define the
> 'foundCustomersLoop'
> in the Java file and in the .jwc, but in both cases I get the same
> exception. This is the definition in the java file :
>
>     @Component(type="For", bindings={"source=listCustomersFound",
> > "value=currentCustomer"})
> >     public abstract IComponent getFoundCustomersLoop();
> >
>
>
> And this is the definition in the .jwc file:
>
>     <component id="foundCustomersLoop" type="For">
> >         <binding name="source" value="listCustomersFound"/>
> >         <binding name="value" value="currentCustomer"/>
> >     </component>
> >
>
> Everything is inside a dojo Dialog, but don't know if this affects in any
> way.
>
> I've searched this problem in the mailing list and didn't seen anything, I
> will really appreciate any hint!
> --
> Robert Ramírez Vique
> Computer Science Engineer
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Robert Ramírez Vique
Computer Science Engineer

RE: Problems with components IF & For

Posted by Firas Adiler <ta...@idigna.com>.
Hi Robert,

The listCustomersFound must be the same on both rewind and submit. Remember
that two List objects (java.util.List) are equal if they contain the same
elements in the same order. I suggest that you sort the list before
returning it to Tapestry.

I believe that was the solution to my problem.

Regards,

</Firas>

-----Original Message-----
From: Roberto Ramírez Vique [mailto:robertrv@gmail.com] 
Sent: Thursday, January 04, 2007 8:06 PM
To: Tapestry users
Subject: Problems with components IF & For

Hello everybody!

I am playing with tapestry 4.1.2 and the @EventListener annotation. I am
using tomcat 5.5 and jdk 5.

I have a form, after submit this form using ajax I build a list in the
server side, then I want to show this list in a For component to show all
the found information. But I can't do this simple think, I am always getting
this exception:

You have clicked on a *stale link*.
>
> Rewind of form AddCustomerPage/customerDetailsForm expected allocated 
> id
> #14 to be 'foundCustomersLoop', but was 'editable4' (requested by 
> component AddCustomerPage/customerDetailsTable.editable4).
>
> 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
>

To me seems the problem is related with the For component, the other
component editable4 is just an Insert component. I've tried to define the
'foundCustomersLoop'
in the Java file and in the .jwc, but in both cases I get the same
exception. This is the definition in the java file :

    @Component(type="For", bindings={"source=listCustomersFound",
> "value=currentCustomer"})
>     public abstract IComponent getFoundCustomersLoop();
>


And this is the definition in the .jwc file:

    <component id="foundCustomersLoop" type="For">
>         <binding name="source" value="listCustomersFound"/>
>         <binding name="value" value="currentCustomer"/>
>     </component>
>

Everything is inside a dojo Dialog, but don't know if this affects in any
way.

I've searched this problem in the mailing list and didn't seen anything, I
will really appreciate any hint!
--
Robert Ramírez Vique
Computer Science Engineer


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