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 2006/09/21 14:18:45 UTC

EventListener can update a For component ?

Hi everybody,

I'm an starter in Tapestry 4.1, using tomcat 5.5 and jdk 1.5

I want to have a link (a plus image :P) that adds a new element to the for
loop. I tried this:

    @EventListener(elements="addLink", events="onclick",
submitForm="userForm", async=true)
    public void addNewRequester(IRequestCycle cycle){
        this.getLoanAdvice().getRequesters().add(new
PersonEconomicEvaluation());

        cycle.getResponseBuilder().updateComponent("requestersLoop");
    }

The html is this:

    <span jwcid="requestersLoop">
    <fieldset>
    <div>
        <a jwcid="removeLinkComponent@Any"><img
src="images/images-new/delsigner_01.jpg" ></a>
    </div>
    </fieldset>

Obviously, "requesterLoop" is a loop over the
getLoanAdvice().getRequesters() ... the method 'addNewRequester' is supose
to add a new item in the for loop. The serverside is called, but the client
side doens't update correctly, eventhough I call the '
cycle.getResponseBuilder().updateComponent("requestersLoop");' method... I
tried updating directly the entire form, but doesn't work.

My first question is, is it possible ?

And the second one is, can any of you see what I'm missing?

Thanks in advance,
-- 
Robert Ramírez Vique
Computer Science Engineer

Re: EventListener can update a For component ?

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

thanks for the fast reply !!!

That's good to know that you have already solved the problem, I tried that
solution and works fine !

I will wait for the new release to solve the problem.

Thanks you!!!!
              robert


On 9/23/06, Jesse Kuhnert <jk...@gmail.com> wrote:
>
> I just noticed and fixed it, but can't "quite" do a new snapshot release
> until some date parsing issues get resolved.
>
> It wouldn't be extremely hard for you to fix temporarily...The
> tapestry.corepackage (
> core.js) had a bug in the load() function...When it found an includescript
> element it would correctly load it but didn't do a block continue...The
> fix
> is to add a continue statement as the other script element types do.
>
> On 9/22/06, Roberto Ramírez Vique <ro...@gmail.com> wrote:
> >
> > Thanks Patrick!!!
> >
> > I've look to this component and now I use a "workarround" I show a radio
> > button to select which item the user wants to remove. This radio button
> > keeps the for index, and in the server side I can refer directly to the
> > correct element. This works fine!!! I'm happy to see that this is really
> > easy to do !
> >
> > But (there is always some problem) I have another problem which it seem
> > really strange, at least for me.
> >
> > The system works fine when inside the loop I just add simple tags. But I
> > have to add a more complex one (a component). Everything is well
> rendered,
> > but when I try to add a new element or any, just using the
> @EventListeners
> > methods, it doesn't work, it arrives to the server, and I get which
> seems
> > to
> > be a correct response, but it doesn't updates correctly the html
> elements.
> > I tried to turn on dojo debugging and get the following error:
> >
> >
> > DEBUG: 0:19:50: Response recieved.
> > DEBUG: 0:19:50: Received element content for id <userFormhidden> of:
> > <input
> > type="hidden" name="formids"
> >
> >
> value="showCondition,userSelector,If,removeRequesterRadioGroup,requestersLoop,maritalStatusSelection,occupationSelection,jobtypeSelection,jobTypeSince,maritalStatusSelection_0,occupationSelection_0,jobtypeSelection_0,jobTypeSince_0,loanAmount,savings,monthlyPay,submitButton"/><input
>
> > type="hidden" name="component" value="userForm"/><input type="hidden"
> > name="page" value="ViewLoanAdvicePage"/><input type="hidden"
> > name="service"
> > value="direct"/><input type="hidden" name="session" value="T"/><input
> > type="hidden" name="submitmode" value=""/><input type="hidden"
> > name="submitname" value=""/><input type="hidden" name="showCondition"
> > value="T"/><input type="hidden" name="If" value="T"/><input
> type="hidden"
> > name="requestersLoop"
> >
> >
> value="VZH4sIAAAAAAAAAJVXTWwbxxUekaYkS7IiK66bxHYk17FgJCkp2a3iwC0SklrZ61AkK0pJbLewh7sj7tjLnc3sUCZ1cOOgP4DTQ4M0vTRBUqAXF74WCXJI0QZF20MC9NAc2kuQBAEK9OfQFo3RNu17s7skJa3SVIDp3Zn33rx57/vee3vrTyQTSPIAC7KKWZ6waECzTWEzN1tlMhCeYQlPNLllrFO3RRUXHgn/BlJktETGYFtJaqmVjs8UOVxiQa5rKKcN5Yp9IqdKZILZLUtbou5pSW1QO5qkZmwRA9Why6IeHnQwSeNsuAuCY5FgjXsWSE+ULtN1mmsp7uYWqEKJkSblnulZogn7B5KshZsguqdJJVfUrSmqWo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RFxLHri24tnS2NP2CuyzHUphKoYoJj3PKYRm3uHLS3oFFngLoDwhz1AyE5khjRpyyrp7ChjdjyEnhhh/+BnCij0TX42oawWMOgpdtOvtS6+1nu7EuTQdjfKU6ZDCcBNmlQd7+FIne249ZQy3NTtax3rJ/GIe9R2VRYgezeyZ9fP1z59LTixsWidAdD07j89uHc9XvXosKXfjlmlKrSkIvhTDkUoyjA6emzrDWO/D/ajdxwtCP5y9efn5/4GJiKa54qx4EupwznwqVNh0GVd3bpAMiRv0Gv0IHrCeCSJ87/F4Gc+hv+dgGciFp1mhz1U2M+GX0kmfy8ckv+72/FvQnmkAcAAA=="/>
>
> > ERROR: 0:19:50: No node could be found to update content in with id
> > includescript
> >
> >
> > Any of you have ever had this exception ???
> >
> > In fact it works when the number of tapetry compenents in the inner
> > tapestry
> > component is very short (3 or less), but I have about 20 components.
> >
> > Thanks in advance!
> >       Robert
> >
> > On 9/22/06, Patrick Moore < transparentpolitics@gmail.com> wrote:
> > >
> > > take a look at the For component docs. This component has pretty good
> > doc
> > > that talks about that issue.
> > >
> > >
> >
> >
> > --
> > Robert Ramírez Vique
> > Computer Science Engineer
> >
> >
>
>
> --
> Jesse Kuhnert
> Tapestry/Dojo/(and a dash of TestNG), team member/developer
>
> Open source based consulting work centered around
> dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
>
>


-- 
Robert Ramírez Vique
Computer Science Engineer

Re: EventListener can update a For component ?

Posted by Jesse Kuhnert <jk...@gmail.com>.
I just noticed and fixed it, but can't "quite" do a new snapshot release
until some date parsing issues get resolved.

It wouldn't be extremely hard for you to fix temporarily...The
tapestry.corepackage (
core.js) had a bug in the load() function...When it found an includescript
element it would correctly load it but didn't do a block continue...The fix
is to add a continue statement as the other script element types do.

On 9/22/06, Roberto Ramírez Vique <ro...@gmail.com> wrote:
>
> Thanks Patrick!!!
>
> I've look to this component and now I use a "workarround" I show a radio
> button to select which item the user wants to remove. This radio button
> keeps the for index, and in the server side I can refer directly to the
> correct element. This works fine!!! I'm happy to see that this is really
> easy to do !
>
> But (there is always some problem) I have another problem which it seem
> really strange, at least for me.
>
> The system works fine when inside the loop I just add simple tags. But I
> have to add a more complex one (a component). Everything is well rendered,
> but when I try to add a new element or any, just using the @EventListeners
> methods, it doesn't work, it arrives to the server, and I get which seems
> to
> be a correct response, but it doesn't updates correctly the html elements.
> I tried to turn on dojo debugging and get the following error:
>
>
> DEBUG: 0:19:50: Response recieved.
> DEBUG: 0:19:50: Received element content for id <userFormhidden> of:
> <input
> type="hidden" name="formids"
>
> value="showCondition,userSelector,If,removeRequesterRadioGroup,requestersLoop,maritalStatusSelection,occupationSelection,jobtypeSelection,jobTypeSince,maritalStatusSelection_0,occupationSelection_0,jobtypeSelection_0,jobTypeSince_0,loanAmount,savings,monthlyPay,submitButton"/><input
> type="hidden" name="component" value="userForm"/><input type="hidden"
> name="page" value="ViewLoanAdvicePage"/><input type="hidden"
> name="service"
> value="direct"/><input type="hidden" name="session" value="T"/><input
> type="hidden" name="submitmode" value=""/><input type="hidden"
> name="submitname" value=""/><input type="hidden" name="showCondition"
> value="T"/><input type="hidden" name="If" value="T"/><input type="hidden"
> name="requestersLoop"
>
> value="VZH4sIAAAAAAAAAJVXTWwbxxUekaYkS7IiK66bxHYk17FgJCkp2a3iwC0SklrZ61AkK0pJbLewh7sj7tjLnc3sUCZ1cOOgP4DTQ4M0vTRBUqAXF74WCXJI0QZF20MC9NAc2kuQBAEK9OfQFo3RNu17s7skJa3SVIDp3Zn33rx57/vee3vrTyQTSPIAC7KKWZ6waECzTWEzN1tlMhCeYQlPNLllrFO3RRUXHgn/BlJktETGYFtJaqmVjs8UOVxiQa5rKKcN5Yp9IqdKZILZLUtbou5pSW1QO5qkZmwRA9Why6IeHnQwSeNsuAuCY5FgjXsWSE+ULtN1mmsp7uYWqEKJkSblnulZogn7B5KshZsguqdJJVfUrSmqWoEin0uSXuqXQfvCslq+9l+RqSSNSlcAHfZ1tKkL7lFFjicpQAiFzFngAvglc2F+itEr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yEnhhh/+BnCij0TX42oawWMOgpdtOvtS6+1nu7EuTQdjfKU6ZDCcBNmlQd7+FIne249ZQy3NTtax3rJ/GIe9R2VRYgezeyZ9fP1z59LTixsWidAdD07j89uHc9XvXosKXfjlmlKrSkIvhTDkUoyjA6emzrDWO/D/ajdxwtCP5y9efn5/4GJiKa54qx4EupwznwqVNh0GVd3bpAMiRv0Gv0IHrCeCSJ87/F4Gc+hv+dgGciFp1mhz1U2M+GX0kmfy8ckv+72/FvQnmkAcAAA=="/>
> ERROR: 0:19:50: No node could be found to update content in with id
> includescript
>
>
> Any of you have ever had this exception ???
>
> In fact it works when the number of tapetry compenents in the inner
> tapestry
> component is very short (3 or less), but I have about 20 components.
>
> Thanks in advance!
>       Robert
>
> On 9/22/06, Patrick Moore < transparentpolitics@gmail.com> wrote:
> >
> > take a look at the For component docs. This component has pretty good
> doc
> > that talks about that issue.
> >
> >
>
>
> --
> Robert Ramírez Vique
> Computer Science Engineer
>
>


-- 
Jesse Kuhnert
Tapestry/Dojo/(and a dash of TestNG), team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

Re: EventListener can update a For component ?

Posted by Roberto Ramírez Vique <ro...@gmail.com>.
Thanks Patrick!!!

I've look to this component and now I use a "workarround" I show a radio
button to select which item the user wants to remove. This radio button
keeps the for index, and in the server side I can refer directly to the
correct element. This works fine!!! I'm happy to see that this is really
easy to do !

But (there is always some problem) I have another problem which it seem
really strange, at least for me.

The system works fine when inside the loop I just add simple tags. But I
have to add a more complex one (a component). Everything is well rendered,
but when I try to add a new element or any, just using the @EventListeners
methods, it doesn't work, it arrives to the server, and I get which seems to
be a correct response, but it doesn't updates correctly the html elements.
I tried to turn on dojo debugging and get the following error:


DEBUG: 0:19:50: Response recieved.
DEBUG: 0:19:50: Received element content for id <userFormhidden> of: <input
type="hidden" name="formids"
value="showCondition,userSelector,If,removeRequesterRadioGroup,requestersLoop,maritalStatusSelection,occupationSelection,jobtypeSelection,jobTypeSince,maritalStatusSelection_0,occupationSelection_0,jobtypeSelection_0,jobTypeSince_0,loanAmount,savings,monthlyPay,submitButton"/><input
type="hidden" name="component" value="userForm"/><input type="hidden"
name="page" value="ViewLoanAdvicePage"/><input type="hidden" name="service"
value="direct"/><input type="hidden" name="session" value="T"/><input
type="hidden" name="submitmode" value=""/><input type="hidden"
name="submitname" value=""/><input type="hidden" name="showCondition"
value="T"/><input type="hidden" name="If" value="T"/><input type="hidden"
name="requestersLoop"
value="VZH4sIAAAAAAAAAJVXTWwbxxUekaYkS7IiK66bxHYk17FgJCkp2a3iwC0SklrZ61AkK0pJbLewh7sj7tjLnc3sUCZ1cOOgP4DTQ4M0vTRBUqAXF74WCXJI0QZF20MC9NAc2kuQBAEK9OfQFo3RNu17s7skJa3SVIDp3Zn33rx57/vee3vrTyQTSPIAC7KKWZ6waECzTWEzN1tlMhCeYQlPNLllrFO3RRUXHgn/BlJktETGYFtJaqmVjs8UOVxiQa5rKKcN5Yp9IqdKZILZLUtbou5pSW1QO5qkZmwRA9Why6IeHnQwSeNsuAuCY5FgjXsWSE+ULtN1mmsp7uYWqEKJkSblnulZogn7B5KshZsguqdJJVfUrSmqWoEin0uSXuqXQfvCslq+9l+RqSSNSlcAHfZ1tKkL7lFFjicpQAiFzFngAvglc2F+itEr2LgjYJANm8pO6PpT5BrJgCcgFZRbzTqTitwZRsKlXgMuqFhDa+67KuQV7jVKfI0VWIN7Hryg+q62JDObsIExzBZowPB4HijmqUr9MrPUg58//WHtJ6+5KTJQIiluo/puUD+YrB4qtd859ZeRx1//OEVI2wcc7kXvsuhdNvJu8r1XfvSP698+CWZNkkEQMjA60ZMLb/atWy8cGv3eu89qQ4DOu65JMpUA6n4sRkAmk6AjyXjPpOG1mv2bviIjq2VjqVqqnDMWwPKRBMtb4dpvAGOxV5Hh2mrVWDYry2DingQTEX4TNO+NDjcuVlcLJbN4Mb+wZJbN2spyfsWslIPYfR1eRLhz+frAY+fU3Wl0/+owWPv51I0DpA2Sdy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tZwoEcDbkNRhcF/qKgMQZZC8kKj1Lmb6LyqqERhp0sC2v+AcPQ3Zu6kz90qCzien6KwMUhsC0UQ/RKuEn7NEhByOAyBYeYj6lQ1xTTMZ4fLLstP0ToUkyNACrbQCG1QI6VoW+MY9z9mrE08fyBHC6LuDUCOMKJV5tKpEeBrJYFoITaBAwpIC8T5PVpDJd4x7LlWI2Imiyn/og8IVVkgih7M4073ADZlyshqephgsB7PnL/Y20eCtULRZev855QChcufNfAkFMT3nAa1tap5e55YYEruNXZ5AzOnb/6rf32nayQHSGpiMiFz2H4ofLwPGjwee3H/N33vyqEDBL/oRkPlJgxz2jbejtDMkNjnSoAcry0HlpxQCnqHoQ5LkTcMiOSvCJ7x3Rog8F0EbIn49TIrEWzGNOyI9941HqGvhm4rBYKohdKiPoi1Yoi1SaLtM1/PiRzHWFgI0I7eqWLDdCPldtYxo2uMBZu0ryUuDEr6cR6SYo+Uq9HkeHWTumK4SnmNyNxX/JR9r4fQr/nO0JEkeRj1y/EuiMkb204Lctldu2PKaPcDulkVsOeFZBNIdRwFTEZgqsgQOavoVPO/FvOQsgXz7YerL/6crBCZu6T2T43oit4hLMF+XRFxLHri24tnS2NP2CuyzHUphKoYoJj3PKYRm3uHLS3oFFngLoDwhz1AyE5khjRpyyrp7ChjdjyEnhhh/+BnCij0TX42oawWMOgpdtOvtS6+1nu7EuTQdjfKU6ZDCcBNmlQd7+FIne249ZQy3NTtax3rJ/GIe9R2VRYgezeyZ9fP1z59LTixsWidAdD07j89uHc9XvXosKXfjlmlKrSkIvhTDkUoyjA6emzrDWO/D/ajdxwtCP5y9efn5/4GJiKa54qx4EupwznwqVNh0GVd3bpAMiRv0Gv0IHrCeCSJ87/F4Gc+hv+dgGciFp1mhz1U2M+GX0kmfy8ckv+72/FvQnmkAcAAA=="/>
ERROR: 0:19:50: No node could be found to update content in with id
includescript


Any of you have ever had this exception ???

In fact it works when the number of tapetry compenents in the inner tapestry
component is very short (3 or less), but I have about 20 components.

Thanks in advance!
      Robert

On 9/22/06, Patrick Moore < transparentpolitics@gmail.com> wrote:
>
> take a look at the For component docs. This component has pretty good doc
> that talks about that issue.
>
>


-- 
Robert Ramírez Vique
Computer Science Engineer

Re: EventListener can update a For component ?

Posted by Patrick Moore <tr...@gmail.com>.
take a look at the For component docs. This component has pretty good doc
that talks about that issue.

Re: EventListener can update a For component ?

Posted by Roberto Ramírez Vique <ro...@gmail.com>.
Thanks you!!!

In fact I see this comment in another thread and I already did this.

Now I have another problem, probably a problem easy to be solved, but I
don't see how to do this. My problem is that I have a "remove" for the same
list, and I have to pass the list index to the serverside... but how can I
make this?

I mean, the index that I want to pass is the index for the loop, what is
again the index for the list source. But this index should be writen in any
point in the client html or can I read this in the server side directly??

Thanks you in advance,
         robert

On 9/21/06, Jesse Kuhnert <jk...@gmail.com> wrote:
>
> Make sure that your "requestorsLoop" is outputting an actual html element
> on
> render. If you can't view source of a rendered page and find an existing
> html element then there is nothing to "update". I think using the For
> component you have to specify element="div || span || whatever " to get it
> to output the content.
>
> On 9/21/06, Roberto Ramírez Vique <ro...@gmail.com> wrote:
> >
> > Hi everybody,
> >
> > I'm an starter in Tapestry 4.1, using tomcat 5.5 and jdk 1.5
> >
> > I want to have a link (a plus image :P) that adds a new element to the
> for
> > loop. I tried this:
> >
> >     @EventListener(elements="addLink", events="onclick",
> > submitForm="userForm", async=true)
> >     public void addNewRequester(IRequestCycle cycle){
> >         this.getLoanAdvice().getRequesters().add(new
> > PersonEconomicEvaluation());
> >
> >         cycle.getResponseBuilder().updateComponent("requestersLoop");
> >     }
> >
> > The html is this:
> >
> >     <span jwcid="requestersLoop">
> >     <fieldset>
> >     <div>
> >         <a jwcid="removeLinkComponent@Any"><img
> > src="images/images-new/delsigner_01.jpg" ></a>
> >     </div>
> >     </fieldset>
> >
> > Obviously, "requesterLoop" is a loop over the
> > getLoanAdvice().getRequesters() ... the method 'addNewRequester' is
> supose
> > to add a new item in the for loop. The serverside is called, but the
> > client
> > side doens't update correctly, eventhough I call the '
> > cycle.getResponseBuilder().updateComponent("requestersLoop");' method...
> I
> > tried updating directly the entire form, but doesn't work.
> >
> > My first question is, is it possible ?
> >
> > And the second one is, can any of you see what I'm missing?
> >
> > Thanks in advance,
> > --
> > Robert Ramírez Vique
> > Computer Science Engineer
> >
> >
>
>
> --
> Jesse Kuhnert
> Tapestry/Dojo/(and a dash of TestNG), team member/developer
>
> Open source based consulting work centered around
> dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
>
>


-- 
Robert Ramírez Vique
Computer Science Engineer

Re: EventListener can update a For component ?

Posted by Jesse Kuhnert <jk...@gmail.com>.
Make sure that your "requestorsLoop" is outputting an actual html element on
render. If you can't view source of a rendered page and find an existing
html element then there is nothing to "update". I think using the For
component you have to specify element="div || span || whatever " to get it
to output the content.

On 9/21/06, Roberto Ramírez Vique <ro...@gmail.com> wrote:
>
> Hi everybody,
>
> I'm an starter in Tapestry 4.1, using tomcat 5.5 and jdk 1.5
>
> I want to have a link (a plus image :P) that adds a new element to the for
> loop. I tried this:
>
>     @EventListener(elements="addLink", events="onclick",
> submitForm="userForm", async=true)
>     public void addNewRequester(IRequestCycle cycle){
>         this.getLoanAdvice().getRequesters().add(new
> PersonEconomicEvaluation());
>
>         cycle.getResponseBuilder().updateComponent("requestersLoop");
>     }
>
> The html is this:
>
>     <span jwcid="requestersLoop">
>     <fieldset>
>     <div>
>         <a jwcid="removeLinkComponent@Any"><img
> src="images/images-new/delsigner_01.jpg" ></a>
>     </div>
>     </fieldset>
>
> Obviously, "requesterLoop" is a loop over the
> getLoanAdvice().getRequesters() ... the method 'addNewRequester' is supose
> to add a new item in the for loop. The serverside is called, but the
> client
> side doens't update correctly, eventhough I call the '
> cycle.getResponseBuilder().updateComponent("requestersLoop");' method... I
> tried updating directly the entire form, but doesn't work.
>
> My first question is, is it possible ?
>
> And the second one is, can any of you see what I'm missing?
>
> Thanks in advance,
> --
> Robert Ramírez Vique
> Computer Science Engineer
>
>


-- 
Jesse Kuhnert
Tapestry/Dojo/(and a dash of TestNG), team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

Re: EventListener can update a For component ?

Posted by Roberto Ramírez Vique <ro...@gmail.com>.
Problem solved, sorry, it was an stupid problem ... just a duplicated id for
the addLink element.

Anyway now this part works.

On 9/21/06, Roberto Ramírez Vique <ro...@gmail.com> wrote:
>
> Hi everybody,
>
> I'm an starter in Tapestry 4.1, using tomcat 5.5 and jdk 1.5
>
> I want to have a link (a plus image :P) that adds a new element to the for
> loop. I tried this:
>
>     @EventListener(elements="addLink", events="onclick",
> submitForm="userForm", async=true)
>     public void addNewRequester(IRequestCycle cycle){
>         this.getLoanAdvice().getRequesters().add(new
> PersonEconomicEvaluation());
>
>         cycle.getResponseBuilder().updateComponent("requestersLoop");
>     }
>
> The html is this:
>
>     <span jwcid="requestersLoop">
>     <fieldset>
>     <div>
>         <a jwcid="removeLinkComponent@Any"><img
> src="images/images-new/delsigner_01.jpg" ></a>
>     </div>
>     </fieldset>
>
> Obviously, "requesterLoop" is a loop over the
> getLoanAdvice().getRequesters() ... the method 'addNewRequester' is supose
> to add a new item in the for loop. The serverside is called, but the client
> side doens't update correctly, eventhough I call the '
> cycle.getResponseBuilder().updateComponent("requestersLoop");' method... I
> tried updating directly the entire form, but doesn't work.
>
> My first question is, is it possible ?
>
> And the second one is, can any of you see what I'm missing?
>
> Thanks in advance,
> --
> Robert Ramírez Vique
> Computer Science Engineer




-- 
Robert Ramírez Vique
Computer Science Engineer