You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Koen Serry <ko...@users.sourceforge.net> on 2005/09/27 09:18:49 UTC

Component listeners

Hi all,

what's the most efficient way of creating a component listener to be used in
pages in T4.
What I'm trying to do is allow pages to set a listener method, which get's
called when an inner (component) form is submitted or when a component's
link was clicked.

Do I correctly assume that we should add the property for the actual
listener method and a getListenerInvoker method that gets called somehow?
Currently I've tried it with the following:

In my component I have the following methods:
----------------------------------------------------------------------------
// page class method...
public abstract IActionListener getLinkAction();

// ref to service responsible for invoking the listener??
public abstract ListenerInvoker getListenerInvoker();
----------------------------------------------------------------------------

In my page class I have a listener method assigned to the linkAction
attribute.

But what I get as error is :
Error converting value for template parameter listener: No type converter
for type org.apache.tapestry.IActionListener is available.

Could anyone enlighten me on how the process works or what the most
efficient way is of creating a listener in a component?

Thanks a lot,
Koen