Use ComponentResources.createEventLink to get the url of relevant events. If you put the xtree component in login page,in your xtree component, componentResources.createEventLink("click", {11,22}) would produce like http://localhost/login.xtree:click/11/22. First to understand url of tapestry: http://localhost/login.xtree:click/11/22 login is the page, xtree is the component, click means the event name, 11/22 means values.
so you can generate the base url in xtree component:componentResources.createEventLink("click") to get http://localhost/login.xtree:click, and append the value 11/22 by js code. Hope it helps. Thanks, DH ----- Original Message ----- From: "Zenberg Ding" <zenberg.d...@gmail.com> To: "Tapestry users" <users@tapestry.apache.org> Sent: Monday, March 16, 2009 11:45 AM Subject: Re: "OnEvent" no response >I still confused with how to fire javascript object event on t5's > components way. so the code maybe not resonable :( > > Is there any document on it? > >> How do you fire the 'click' event in your xtree component? >> This 'click' is not the one 'click' in html dom. >> >> Thanks, >> DH >> >> >> ----- Original Message ----- >> From: "Ding Zenberg" >> To: <users@tapestry.apache.org> >> Sent: Monday, March 16, 2009 10:11 AM >> Subject: "OnEvent" no response >> >> >>> Hi all, >>> >>> Here is the case, I put one component named "xtree" on start page, >>> then I wrote on method to receive events from this component. >>> >>> <div t:id="treebox" t:type="t5/SidePanel" style="height:600px"> >>> <div t:type="xtree"/> >>> </div> >>> >>> >>> @OnEvent(value="click", component="xtree") >>> void onTreeClick() { >>> System.out.println("tree clicked ..."); >>> } >>> >>> but there is no output expected. I want to know where's problem. >>> >>> Thanks. >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >>> For additional commands, e-mail: users-h...@tapestry.apache.org > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > >