Re: OnEvent no response
It's realy helpful, I'll look into it, thank you :) How can I link js tree's internal envent (onSelect(itemIdList) onDblClick(itemId)) with t5 xtree's component when I use createEventLink? Or write js code to encapsulate the original js tree events? Does tapestry5 has some internal mechanisms linking client to backgroud? Any further information on event topic is welcome. 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 - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: OnEvent no response
I would suggest you to look at the source of onevent mixin (not onevent annotation) in t5commons project. Thanks, DH - Original Message - From: Zenberg Ding To: Tapestry users users@tapestry.apache.org Sent: Monday, March 16, 2009 2:00 PM Subject: Re: OnEvent no response It's realy helpful, I'll look into it, thank you :) How can I link js tree's internal envent (onSelect(itemIdList) onDblClick(itemId)) with t5 xtree's component when I use createEventLink? Or write js code to encapsulate the original js tree events? Does tapestry5 has some internal mechanisms linking client to backgroud? Any further information on event topic is welcome. 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
about 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
Re: OnEvent no response
Em Sun, 15 Mar 2009 23:11:02 -0300, Ding Zenberg zenberg.d...@gmail.com escreveu: 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. Try adding t:id=xtree to div t:type=xtree/. @OnEvent's component attribute is a component id (set by t:id), not the component name, as it may seem at first. -- Thiago H. de Paula Figueiredo Independent Java consultant, developer, and instructor http://www.arsmachina.com.br/thiago - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: OnEvent no response
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
Re: OnEvent no response
Oh, That's just what I trying. Write a tree component is my evaluating t5 's way. And I still confused with how to fire a js tree's envents such as onCheckNode(itemId) onExpandNode(itemId) on t5's way. Is there any document on this subject? 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
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