Great! ognl:page.listeners.doClick did the job. I wasn't aware that you could also use a ognl expression instead of a listener expression.
Injecting an ASO into a component worked as well. Somehow I thought this wasn't possible. Thanks for the quick help. Bye Markus 2007/4/19, Ben Dotte <[EMAIL PROTECTED]>:
Hi Markus, Is there any reason you can't inject the ASO into your component class? @InjectState("nameofASO") public abstract MyASO getMyASO(); Otherwise if you really want to access the listener on the page I wonder if listener:page.listeners.doClick would work instead. HTH Ben -----Original Message----- From: Markus Kramer [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 18, 2007 5:22 PM To: users@tapestry.apache.org Subject: Invoke a page listener from a component template Hi everyone, I've got a DirectLink in a component template. But when this link is clicked I don't want to call a listener method of that component, but a listener method of the page that contains the component. I tried it like this, but it didn't work: <a href="#" jwcid="@DirectLink" listener="listener:page.doClick">xyz</a> The reason is that I need access to an application state object. Alternatively I'm thinking about to have my component write out the HTML code directly, and not to use a template. The component could then print a hyperlink without using the DirectLink component. But I don't know how such a 'static' link might look like, since Tapestry's URLs don't have a parameter which tells it what listener method is supposed to be invoked. Any ideas would be appreciated! - Markus --------------------------------------------------------------------- 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]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]