Sorry, I meant ognl:page.listeners.doClick

-----Original Message-----
From: Ben Dotte [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 18, 2007 5:28 PM
To: Tapestry users
Subject: RE: Invoke a page listener from a component template

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]

Reply via email to