Re: Handling components event in the page that includes the component

2011-09-24 Thread Geoff Callender
In case it helps, here is an example of custom components triggering events with no callback: http://jumpstart.doublenegative.com.au/jumpstart/examples/component/crud/persons and with callback (returning the zone(s) to update):

Handling components event in the page that includes the component

2011-09-23 Thread bhorvat
Is it possible to handle the components event in the page that includes the component. Say I have a component and in that component I have two submit links with their own id's. How do I see which link was clicked in the page that includes the component? -- View this message in context:

Re: Handling components event in the page that includes the component

2011-09-23 Thread bhorvat
I probably din't explain it very well. I have component with two submit links in it. I also have a page that includes that component those two links. I need to write in that page that includes the components the event handling for those two links but I am not sure how. If I write handler in the

Re: Handling components event in the page that includes the component

2011-09-23 Thread Chris Poulsen
Events bubble up in the page hierarchy afaik. So you could try to postfix your handlers with Frommy-t:id something like: onActionFromMyComponentId(...) ? -- Chris On Fri, Sep 23, 2011 at 3:24 PM, bhorvat horvat.z.bo...@gmail.com wrote: I probably din't explain it very well. I have

Re: Handling components event in the page that includes the component

2011-09-23 Thread bhorvat
Yea I come to the same conclusion by trying to insert a method void onSelected{ } This method is activated, but I need to activate it with a ID so that I can have two methods void onSelectedFromFirst{ } void onSelectedFromSecond{ } However this doesn't work. So any ideas how should I call

Re: Handling components event in the page that includes the component

2011-09-23 Thread Chris Poulsen
Hi, I'm still not clear on what you are doing and where - did your mail client strip out your source code example? ;) http://tapestry.apache.org/component-events.html should explain how the handler stuff works. -- Chris On Fri, Sep 23, 2011 at 3:53 PM, bhorvat horvat.z.bo...@gmail.com wrote:

Re: Handling components event in the page that includes the component

2011-09-23 Thread bhorvat
Ok let try explaining everything from the top :D I have a page called Index and in that page I have included a component called Popup. Now this component is basically a html popup with two tapestry links. Then I surround this component in a form and when I click the link (the link is from the

Re: Handling components event in the page that includes the component

2011-09-23 Thread Thiago H. de Paula Figueiredo
On Fri, 23 Sep 2011 10:23:50 -0300, Boris Horvat horvat.z.bo...@gmail.com wrote: I probably din't explain it very well. I disagree. :) I guess I haven't explained my suggestion well. I have component with two submit links in it. I also have a page that includes those two links. I need to

Re: Handling components event in the page that includes the component

2011-09-23 Thread Chris Poulsen
Wow Thiago, that is pretty cool. I haven't found (/noticed) this in the docs yet, can you provide a pointer? -- Chris On Fri, Sep 23, 2011 at 5:27 PM, Thiago H. de Paula Figueiredo thiag...@gmail.com wrote: On Fri, 23 Sep 2011 10:23:50 -0300, Boris Horvat horvat.z.bo...@gmail.com wrote:

Re: Handling components event in the page that includes the component

2011-09-23 Thread bhorvat
Perfect. This works. Thank you so much for your assistance. So I can't access the link's id from the page since it is local to the component but I can trigger an event and handle that. Great. :D Can I ask for one more thing if it is not to much of a trouble. Is it possible and how do I access

Re: Handling components event in the page that includes the component

2011-09-23 Thread Chris Poulsen
Inject ComponentResources and poke around? -- Chris On Fri, Sep 23, 2011 at 5:45 PM, bhorvat horvat.z.bo...@gmail.com wrote: Perfect. This works. Thank you so much for your assistance. So I can't access the link's id from the page since it is local to the component but I can trigger an

Re: Handling components event in the page that includes the component

2011-09-23 Thread bhorvat
Yap, that solved all my problems. Thank you both so much Cheers -- View this message in context: http://tapestry.1045711.n5.nabble.com/Handling-components-event-in-the-page-that-includes-the-component-tp4833388p4834135.html Sent from the Tapestry - User mailing list archive at Nabble.com.

Re: Handling components event in the page that includes the component

2011-09-23 Thread Thiago H. de Paula Figueiredo
On Fri, 23 Sep 2011 13:11:25 -0300, Chris Poulsen mailingl...@nesluop.dk wrote: Nice to know you got it working! I'm still interested in the docs mentioning the custom component events. If they are missing, it should definitely be added. (I was expecting to find it on

Re: Handling components event in the page that includes the component

2011-09-23 Thread Chris Poulsen
Yeah I think that part should be mentioned - its a really neat feature! I'll dig into it and see if I can get around to whipping up a suggestion for JIRA. -- Chris On Fri, Sep 23, 2011 at 6:56 PM, Thiago H. de Paula Figueiredo thiag...@gmail.com wrote: On Fri, 23 Sep 2011 13:11:25 -0300,