Re: An ajax question (sending ajax request without binded to a component)
Thanks for the reply, I should have thought about that. HugoPalma wrote: > > Create a method in the class of the page or component from where you're > making the call like this: > > public String getMyEventUrl(){ > return componentResources.createEventLink("myEvent").toURI(); > } > > Then on the template your javascript can be something like: > > Ajax.Request('${myEventUrl}') > > On Fri, Apr 17, 2009 at 10:15 PM, roubaozi wrote: > >> >> Hi, >> >> I am trying to use Tapestry 5.0.18 to finish a small project I am working >> on, and I am stuck. >> >> I am trying to accomplish an ajax call from the client side using >> prototype >> Ajax.Request(), and on the server side I am trying to update a >> persist(session) property in the page class when the ajax request gets to >> the server side. I know all Tapestry ajax approaches are like a mixin or >> event binded to a component, and use an event handler method on the >> server >> side to process the request. But my situation is, there is no component I >> can bind to, I am triggering the ajax request with some events like >> window.onload() or ontimeout() which don't have a Tapestry component I >> can >> bind to. >> >> So how do I send an ajax request from client to a method on the server >> side? >> how do I create the url which the ajax.request is sending to? >> >> Thanks in advance. >> -- >> View this message in context: >> http://www.nabble.com/An-ajax-question-%28sending-ajax-request-without-binded-to-a-component%29-tp23105754p23105754.html >> Sent from the Tapestry - User mailing list archive at Nabble.com. >> >> >> ----- >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >> For additional commands, e-mail: users-h...@tapestry.apache.org >> >> > > -- View this message in context: http://www.nabble.com/An-ajax-question-%28sending-ajax-request-without-binded-to-a-component%29-tp23105754p23141922.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: An ajax question (sending ajax request without binded to a component)
Create a method in the class of the page or component from where you're making the call like this: public String getMyEventUrl(){ return componentResources.createEventLink("myEvent").toURI(); } Then on the template your javascript can be something like: Ajax.Request('${myEventUrl}') On Fri, Apr 17, 2009 at 10:15 PM, roubaozi wrote: > > Hi, > > I am trying to use Tapestry 5.0.18 to finish a small project I am working > on, and I am stuck. > > I am trying to accomplish an ajax call from the client side using prototype > Ajax.Request(), and on the server side I am trying to update a > persist(session) property in the page class when the ajax request gets to > the server side. I know all Tapestry ajax approaches are like a mixin or > event binded to a component, and use an event handler method on the server > side to process the request. But my situation is, there is no component I > can bind to, I am triggering the ajax request with some events like > window.onload() or ontimeout() which don't have a Tapestry component I can > bind to. > > So how do I send an ajax request from client to a method on the server > side? > how do I create the url which the ajax.request is sending to? > > Thanks in advance. > -- > View this message in context: > http://www.nabble.com/An-ajax-question-%28sending-ajax-request-without-binded-to-a-component%29-tp23105754p23105754.html > Sent from the Tapestry - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > >
An ajax question (sending ajax request without binded to a component)
Hi, I am trying to use Tapestry 5.0.18 to finish a small project I am working on, and I am stuck. I am trying to accomplish an ajax call from the client side using prototype Ajax.Request(), and on the server side I am trying to update a persist(session) property in the page class when the ajax request gets to the server side. I know all Tapestry ajax approaches are like a mixin or event binded to a component, and use an event handler method on the server side to process the request. But my situation is, there is no component I can bind to, I am triggering the ajax request with some events like window.onload() or ontimeout() which don't have a Tapestry component I can bind to. So how do I send an ajax request from client to a method on the server side? how do I create the url which the ajax.request is sending to? Thanks in advance. -- View this message in context: http://www.nabble.com/An-ajax-question-%28sending-ajax-request-without-binded-to-a-component%29-tp23105754p23105754.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: ajax question
I've gotten around IE's lack of innerHTML support in tables by creating an entirely new table then ripping the row(s) out of it. ... var rowHtml = '<tr><td>data</td></tr>'; var div = document.createElement('div'); div.innerHtml = '<table><tbody>' + rowHtml + '</tbody></table>'; var tbody = div.firstChild.firstChild; var row = tbody.firstChild; tbody.removeChild(row); document.getElementById('mainTbody').appendChild(row); Cheers, Lance. Jesse Kuhnert wrote: In IE you can only replace the inner content of td elements, anything above that is off limits. But..tables are still a perfectly acceptable way to lay content out. I've played the floating div css whatever game and found it to be more trouble than it's worth a lot (but not always) of the time. Or I'm just lazy. :) (but even the "ajax kings" - ie gmail / others use a lot of tables as well so it must be not as bad as people think) On 7/28/07, Andrea Chiumenti <[EMAIL PROTECTED]> wrote: For what I can remember table elements substitution (innerHTML ='...') have problem under M$IE either if you threat 'em with dom. The tbody element is needed tho handle all table 'real' content and to separate that content from the header and footer that i threat for different scopes. On 7/28/07, Evan Rawson - Work <[EMAIL PROTECTED]> wrote: that is true they do get tricky when it comes to vertical scaling, you need to use javascript to maintain that. however im still confused onto y you are using a tbody. i have no idea wether a tbody would have problems with ajax. I dont think it would. - Original Message - From: "Andrea Chiumenti" <[EMAIL PROTECTED]> To: "Tapestry users" Sent: Friday, July 27, 2007 5:23 PM Subject: Re: ajax question Yes the use of div would be very nice, but as far as I know div elements don't expand very well vertically, so building a table using div elements for cells and rows would be a little tricky. sigh! ps.: I hate tables too On 7/27/07, Evan Rawson - Work <[EMAIL PROTECTED]> wrote: tbody is a soon to be deprecated html element. i would recommend steering away from tables and try to utilize div's and css as much as possible. Especially if you wanna be using alot of AJAX. - Original Message - From: "Andrea Chiumenti" <[EMAIL PROTECTED]> To: "Tapestry users" Sent: Thursday, July 26, 2007 1:30 AM Subject: Re: ajax question Yea! "..because they are evil bastards" +1 On 7/26/07, Marcus Schulte <[EMAIL PROTECTED]> wrote: - at least, that's a pretty decent reason, isn't it? 2007/7/26, Jesse Kuhnert <[EMAIL PROTECTED]>: IE won't let you do it. ..because they are evil bastards. On 7/25/07, Andrea Chiumenti <[EMAIL PROTECTED]> wrote: Does anybody know if there are some problems in updating a tbody element when performing an ajax request? Thx, kiuma -- Jesse Kuhnert Tapestry/Dojo team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com -- Marcus Schulte http://marcus-schulte.blogspot.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]
Re: ajax question
In IE you can only replace the inner content of td elements, anything above that is off limits. But..tables are still a perfectly acceptable way to lay content out. I've played the floating div css whatever game and found it to be more trouble than it's worth a lot (but not always) of the time. Or I'm just lazy. :) (but even the "ajax kings" - ie gmail / others use a lot of tables as well so it must be not as bad as people think) On 7/28/07, Andrea Chiumenti <[EMAIL PROTECTED]> wrote: > For what I can remember table elements substitution (innerHTML ='...') have > problem under M$IE either if you threat 'em with dom. > The tbody element is needed tho handle all table 'real' content and to > separate that content from the header and footer that i threat for different > scopes. > > On 7/28/07, Evan Rawson - Work <[EMAIL PROTECTED]> wrote: > > > > that is true they do get tricky when it comes to vertical scaling, you > > need > > to use javascript to maintain that. however im still confused onto y you > > are > > using a tbody. i have no idea wether a tbody would have problems with > > ajax. > > I dont think it would. > > - Original Message - > > From: "Andrea Chiumenti" <[EMAIL PROTECTED]> > > To: "Tapestry users" > > Sent: Friday, July 27, 2007 5:23 PM > > Subject: Re: ajax question > > > > > > > Yes the use of div would be very nice, but as far as I know div elements > > > don't expand very well vertically, so building a table using div > > elements > > > for cells and rows would be a little tricky. sigh! > > > > > > ps.: I hate tables too > > > > > > On 7/27/07, Evan Rawson - Work <[EMAIL PROTECTED]> wrote: > > >> > > >> tbody is a soon to be deprecated html element. i would recommend > > steering > > >> away from tables and try to utilize div's and css as much as possible. > > >> Especially if you wanna be using alot of AJAX. > > >> - Original Message - > > >> From: "Andrea Chiumenti" <[EMAIL PROTECTED]> > > >> To: "Tapestry users" > > >> Sent: Thursday, July 26, 2007 1:30 AM > > >> Subject: Re: ajax question > > >> > > >> > > >> > Yea! > > >> > "..because they are evil bastards" > > >> > +1 > > >> > > > >> > > > >> > On 7/26/07, Marcus Schulte <[EMAIL PROTECTED]> wrote: > > >> >> > > >> >> - at least, that's a pretty decent reason, isn't it? > > >> >> > > >> >> 2007/7/26, Jesse Kuhnert <[EMAIL PROTECTED]>: > > >> >> > > > >> >> > IE won't let you do it. ..because they are evil bastards. > > >> >> > > > >> >> > On 7/25/07, Andrea Chiumenti <[EMAIL PROTECTED]> wrote: > > >> >> > > > > >> >> > > Does anybody know if there are some problems in updating a tbody > > >> >> element > > >> >> > > when performing an ajax request? > > >> >> > > > > >> >> > > Thx, > > >> >> > > kiuma > > >> >> > > > > >> >> > > > >> >> > > > >> >> > > > >> >> > -- > > >> >> > Jesse Kuhnert > > >> >> > Tapestry/Dojo team member/developer > > >> >> > > > >> >> > Open source based consulting work centered around > > >> >> > dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com > > >> >> > > > >> >> > > >> >> > > >> >> > > >> >> -- > > >> >> Marcus Schulte > > >> >> http://marcus-schulte.blogspot.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] > > > > > -- Jesse Kuhnert Tapestry/Dojo team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ajax question
For what I can remember table elements substitution (innerHTML ='...') have problem under M$IE either if you threat 'em with dom. The tbody element is needed tho handle all table 'real' content and to separate that content from the header and footer that i threat for different scopes. On 7/28/07, Evan Rawson - Work <[EMAIL PROTECTED]> wrote: > > that is true they do get tricky when it comes to vertical scaling, you > need > to use javascript to maintain that. however im still confused onto y you > are > using a tbody. i have no idea wether a tbody would have problems with > ajax. > I dont think it would. > - Original Message - > From: "Andrea Chiumenti" <[EMAIL PROTECTED]> > To: "Tapestry users" > Sent: Friday, July 27, 2007 5:23 PM > Subject: Re: ajax question > > > > Yes the use of div would be very nice, but as far as I know div elements > > don't expand very well vertically, so building a table using div > elements > > for cells and rows would be a little tricky. sigh! > > > > ps.: I hate tables too > > > > On 7/27/07, Evan Rawson - Work <[EMAIL PROTECTED]> wrote: > >> > >> tbody is a soon to be deprecated html element. i would recommend > steering > >> away from tables and try to utilize div's and css as much as possible. > >> Especially if you wanna be using alot of AJAX. > >> - Original Message - > >> From: "Andrea Chiumenti" <[EMAIL PROTECTED]> > >> To: "Tapestry users" > >> Sent: Thursday, July 26, 2007 1:30 AM > >> Subject: Re: ajax question > >> > >> > >> > Yea! > >> > "..because they are evil bastards" > >> > +1 > >> > > >> > > >> > On 7/26/07, Marcus Schulte <[EMAIL PROTECTED]> wrote: > >> >> > >> >> - at least, that's a pretty decent reason, isn't it? > >> >> > >> >> 2007/7/26, Jesse Kuhnert <[EMAIL PROTECTED]>: > >> >> > > >> >> > IE won't let you do it. ..because they are evil bastards. > >> >> > > >> >> > On 7/25/07, Andrea Chiumenti <[EMAIL PROTECTED]> wrote: > >> >> > > > >> >> > > Does anybody know if there are some problems in updating a tbody > >> >> element > >> >> > > when performing an ajax request? > >> >> > > > >> >> > > Thx, > >> >> > > kiuma > >> >> > > > >> >> > > >> >> > > >> >> > > >> >> > -- > >> >> > Jesse Kuhnert > >> >> > Tapestry/Dojo team member/developer > >> >> > > >> >> > Open source based consulting work centered around > >> >> > dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com > >> >> > > >> >> > >> >> > >> >> > >> >> -- > >> >> Marcus Schulte > >> >> http://marcus-schulte.blogspot.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] > >
Re: ajax question
that is true they do get tricky when it comes to vertical scaling, you need to use javascript to maintain that. however im still confused onto y you are using a tbody. i have no idea wether a tbody would have problems with ajax. I dont think it would. - Original Message - From: "Andrea Chiumenti" <[EMAIL PROTECTED]> To: "Tapestry users" Sent: Friday, July 27, 2007 5:23 PM Subject: Re: ajax question Yes the use of div would be very nice, but as far as I know div elements don't expand very well vertically, so building a table using div elements for cells and rows would be a little tricky. sigh! ps.: I hate tables too On 7/27/07, Evan Rawson - Work <[EMAIL PROTECTED]> wrote: tbody is a soon to be deprecated html element. i would recommend steering away from tables and try to utilize div's and css as much as possible. Especially if you wanna be using alot of AJAX. - Original Message - From: "Andrea Chiumenti" <[EMAIL PROTECTED]> To: "Tapestry users" Sent: Thursday, July 26, 2007 1:30 AM Subject: Re: ajax question > Yea! > "..because they are evil bastards" > +1 > > > On 7/26/07, Marcus Schulte <[EMAIL PROTECTED]> wrote: >> >> - at least, that's a pretty decent reason, isn't it? >> >> 2007/7/26, Jesse Kuhnert <[EMAIL PROTECTED]>: >> > >> > IE won't let you do it. ..because they are evil bastards. >> > >> > On 7/25/07, Andrea Chiumenti <[EMAIL PROTECTED]> wrote: >> > > >> > > Does anybody know if there are some problems in updating a tbody >> element >> > > when performing an ajax request? >> > > >> > > Thx, >> > > kiuma >> > > >> > >> > >> > >> > -- >> > Jesse Kuhnert >> > Tapestry/Dojo team member/developer >> > >> > Open source based consulting work centered around >> > dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com >> > >> >> >> >> -- >> Marcus Schulte >> http://marcus-schulte.blogspot.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]
Re: ajax question
Yes the use of div would be very nice, but as far as I know div elements don't expand very well vertically, so building a table using div elements for cells and rows would be a little tricky. sigh! ps.: I hate tables too On 7/27/07, Evan Rawson - Work <[EMAIL PROTECTED]> wrote: > > tbody is a soon to be deprecated html element. i would recommend steering > away from tables and try to utilize div's and css as much as possible. > Especially if you wanna be using alot of AJAX. > - Original Message - > From: "Andrea Chiumenti" <[EMAIL PROTECTED]> > To: "Tapestry users" > Sent: Thursday, July 26, 2007 1:30 AM > Subject: Re: ajax question > > > > Yea! > > "..because they are evil bastards" > > +1 > > > > > > On 7/26/07, Marcus Schulte <[EMAIL PROTECTED]> wrote: > >> > >> - at least, that's a pretty decent reason, isn't it? > >> > >> 2007/7/26, Jesse Kuhnert <[EMAIL PROTECTED]>: > >> > > >> > IE won't let you do it. ..because they are evil bastards. > >> > > >> > On 7/25/07, Andrea Chiumenti <[EMAIL PROTECTED]> wrote: > >> > > > >> > > Does anybody know if there are some problems in updating a tbody > >> element > >> > > when performing an ajax request? > >> > > > >> > > Thx, > >> > > kiuma > >> > > > >> > > >> > > >> > > >> > -- > >> > Jesse Kuhnert > >> > Tapestry/Dojo team member/developer > >> > > >> > Open source based consulting work centered around > >> > dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com > >> > > >> > >> > >> > >> -- > >> Marcus Schulte > >> http://marcus-schulte.blogspot.com > >> > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: ajax question
tbody is a soon to be deprecated html element. i would recommend steering away from tables and try to utilize div's and css as much as possible. Especially if you wanna be using alot of AJAX. - Original Message - From: "Andrea Chiumenti" <[EMAIL PROTECTED]> To: "Tapestry users" Sent: Thursday, July 26, 2007 1:30 AM Subject: Re: ajax question Yea! "..because they are evil bastards" +1 On 7/26/07, Marcus Schulte <[EMAIL PROTECTED]> wrote: - at least, that's a pretty decent reason, isn't it? 2007/7/26, Jesse Kuhnert <[EMAIL PROTECTED]>: > > IE won't let you do it. ..because they are evil bastards. > > On 7/25/07, Andrea Chiumenti <[EMAIL PROTECTED]> wrote: > > > > Does anybody know if there are some problems in updating a tbody element > > when performing an ajax request? > > > > Thx, > > kiuma > > > > > > -- > Jesse Kuhnert > Tapestry/Dojo team member/developer > > Open source based consulting work centered around > dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com > -- Marcus Schulte http://marcus-schulte.blogspot.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ajax question
Yea! "..because they are evil bastards" +1 On 7/26/07, Marcus Schulte <[EMAIL PROTECTED]> wrote: - at least, that's a pretty decent reason, isn't it? 2007/7/26, Jesse Kuhnert <[EMAIL PROTECTED]>: > > IE won't let you do it. ..because they are evil bastards. > > On 7/25/07, Andrea Chiumenti <[EMAIL PROTECTED]> wrote: > > > > Does anybody know if there are some problems in updating a tbody element > > when performing an ajax request? > > > > Thx, > > kiuma > > > > > > -- > Jesse Kuhnert > Tapestry/Dojo team member/developer > > Open source based consulting work centered around > dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com > -- Marcus Schulte http://marcus-schulte.blogspot.com
Re: ajax question
- at least, that's a pretty decent reason, isn't it? 2007/7/26, Jesse Kuhnert <[EMAIL PROTECTED]>: IE won't let you do it. ..because they are evil bastards. On 7/25/07, Andrea Chiumenti <[EMAIL PROTECTED]> wrote: > > Does anybody know if there are some problems in updating a tbody element > when performing an ajax request? > > Thx, > kiuma > -- Jesse Kuhnert Tapestry/Dojo team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com -- Marcus Schulte http://marcus-schulte.blogspot.com
Re: ajax question
IE won't let you do it. ..because they are evil bastards. On 7/25/07, Andrea Chiumenti <[EMAIL PROTECTED]> wrote: Does anybody know if there are some problems in updating a tbody element when performing an ajax request? Thx, kiuma -- Jesse Kuhnert Tapestry/Dojo team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
ajax question
Does anybody know if there are some problems in updating a tbody element when performing an ajax request? Thx, kiuma
Re: Tap 4.1.1 TextField Ajax question
Yes, 4.1.2 requires ognl 2.7-SNAPSHOT. http://howardlewisship.com/repository/ognl/ognl/ On 4/30/07, Tony Nelson <[EMAIL PROTECTED]> wrote: I would be very happy to use Tapestry 4.1.2 but I run into a problem every time I try the latest snapshot: java.lang.NoClassDefFoundError: ognl/enhance/ExpressionAccessor I assume this related to the OGNL stability you mention. Is there a newer beta of OGNL I grab from somewhere to get moving along? If so I'll just throw it in my local repository for now. Thanks again Tony Jesse Kuhnert wrote: > You want to use targets="" . Elements = "" is strictly for pure html > elements and not tapestry components. > > If you use the 4.1.2-SNAPSHOT version it will also automatically > figure out > which form your targeted components are attached to and submit that as > part > of the event so that you can do things like get the current value of the > field. > > 4.1.2 should be released very soon, just holding out for ognl stability. > > On 4/30/07, Tony Nelson <[EMAIL PROTECTED]> wrote: >> >> I am attempting to use @EventListener to submit the value of a TextField >> onChange. So, I have an input defined: >> >> >displayName="Text" /> >> >> In the page class I have: >> >> @Component(bindings = {"validators=validators:required"}) >> public abstract TextField getMyField(); >> >> @EventListener(events={"onchange"}, elements="myField") >> public void testEvent(IRequestCycle cycle) >> { >> logger.debug("LOOKHERE... " + getText()); >> } >> >> But I'll be darned if any of the events are firing. >> >> To rule out other problems, I copied the "big brother is watching" >> sample from: >> >> http://tapestry.apache.org/tapestry4.1/ajax/eventlistener.html >> >> to the same page, and it works just fine.. >> >> 30 Apr 2007 11:35:36,658 [http-8080-Processor24] DEBUG >> com.starpoint.instihire.web.tapestry.page.Test - User clicked on x/y >> coordinates 159/326 >> >> Am I barking up the wrong tree? My final goal is to have a dropdown >> update it's contents based on the text in the TextField, but until I can >> dynamically get it's value I'm stuck. >> >> Thanks in advance for all the help. >> Tony Nelson >> >> >> >> >> - >> 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] -- Jesse Kuhnert Tapestry/Dojo team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
Re: Tap 4.1.1 TextField Ajax question
I would be very happy to use Tapestry 4.1.2 but I run into a problem every time I try the latest snapshot: java.lang.NoClassDefFoundError: ognl/enhance/ExpressionAccessor I assume this related to the OGNL stability you mention. Is there a newer beta of OGNL I grab from somewhere to get moving along? If so I'll just throw it in my local repository for now. Thanks again Tony Jesse Kuhnert wrote: You want to use targets="" . Elements = "" is strictly for pure html elements and not tapestry components. If you use the 4.1.2-SNAPSHOT version it will also automatically figure out which form your targeted components are attached to and submit that as part of the event so that you can do things like get the current value of the field. 4.1.2 should be released very soon, just holding out for ognl stability. On 4/30/07, Tony Nelson <[EMAIL PROTECTED]> wrote: I am attempting to use @EventListener to submit the value of a TextField onChange. So, I have an input defined: In the page class I have: @Component(bindings = {"validators=validators:required"}) public abstract TextField getMyField(); @EventListener(events={"onchange"}, elements="myField") public void testEvent(IRequestCycle cycle) { logger.debug("LOOKHERE... " + getText()); } But I'll be darned if any of the events are firing. To rule out other problems, I copied the "big brother is watching" sample from: http://tapestry.apache.org/tapestry4.1/ajax/eventlistener.html to the same page, and it works just fine.. 30 Apr 2007 11:35:36,658 [http-8080-Processor24] DEBUG com.starpoint.instihire.web.tapestry.page.Test - User clicked on x/y coordinates 159/326 Am I barking up the wrong tree? My final goal is to have a dropdown update it's contents based on the text in the TextField, but until I can dynamically get it's value I'm stuck. Thanks in advance for all the help. Tony Nelson - 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]
Re: Tap 4.1.1 TextField Ajax question
You want to use targets="" . Elements = "" is strictly for pure html elements and not tapestry components. If you use the 4.1.2-SNAPSHOT version it will also automatically figure out which form your targeted components are attached to and submit that as part of the event so that you can do things like get the current value of the field. 4.1.2 should be released very soon, just holding out for ognl stability. On 4/30/07, Tony Nelson <[EMAIL PROTECTED]> wrote: I am attempting to use @EventListener to submit the value of a TextField onChange. So, I have an input defined: In the page class I have: @Component(bindings = {"validators=validators:required"}) public abstract TextField getMyField(); @EventListener(events={"onchange"}, elements="myField") public void testEvent(IRequestCycle cycle) { logger.debug("LOOKHERE... " + getText()); } But I'll be darned if any of the events are firing. To rule out other problems, I copied the "big brother is watching" sample from: http://tapestry.apache.org/tapestry4.1/ajax/eventlistener.html to the same page, and it works just fine.. 30 Apr 2007 11:35:36,658 [http-8080-Processor24] DEBUG com.starpoint.instihire.web.tapestry.page.Test - User clicked on x/y coordinates 159/326 Am I barking up the wrong tree? My final goal is to have a dropdown update it's contents based on the text in the TextField, but until I can dynamically get it's value I'm stuck. Thanks in advance for all the help. Tony Nelson - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Jesse Kuhnert Tapestry/Dojo team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
Tap 4.1.1 TextField Ajax question
I am attempting to use @EventListener to submit the value of a TextField onChange. So, I have an input defined: In the page class I have: @Component(bindings = {"validators=validators:required"}) public abstract TextField getMyField(); @EventListener(events={"onchange"}, elements="myField") public void testEvent(IRequestCycle cycle) { logger.debug("LOOKHERE... " + getText()); } But I'll be darned if any of the events are firing. To rule out other problems, I copied the "big brother is watching" sample from: http://tapestry.apache.org/tapestry4.1/ajax/eventlistener.html to the same page, and it works just fine.. 30 Apr 2007 11:35:36,658 [http-8080-Processor24] DEBUG com.starpoint.instihire.web.tapestry.page.Test - User clicked on x/y coordinates 159/326 Am I barking up the wrong tree? My final goal is to have a dropdown update it's contents based on the text in the TextField, but until I can dynamically get it's value I'm stuck. Thanks in advance for all the help. Tony Nelson - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]