org.apache.tapestry.listener
Class SyntheticListener

java.lang.Object
  extended by org.apache.tapestry.listener.SyntheticListener
All Implemented Interfaces:
IActionListener

public class SyntheticListener
extends Object
implements IActionListener

Adapter class that combines a target object (typically, a component) with a ListenerMethodInvoker. This is the bridge from listener method names to listener method invocations.

TODO: It would really be nice if we could get the location of the listener binding into thrown exceptions. As implemented, as best, it will be the location of the <page-specification> (or <component>) of the page (or component) containing the listener method.

Since:
4.0
Author:
Howard M. Lewis Ship

Constructor Summary
SyntheticListener(Object target, ListenerMethodInvoker invoker)
           
 
Method Summary
 void actionTriggered(IComponent component, IRequestCycle cycle)
          Method invoked by the component (an DirectLink or Form, when its URL is triggered.
 String getMethodName()
          The actual method name that this listener represents.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SyntheticListener

public SyntheticListener(Object target,
                         ListenerMethodInvoker invoker)
Method Detail

actionTriggered

public void actionTriggered(IComponent component,
                            IRequestCycle cycle)
Description copied from interface: IActionListener
Method invoked by the component (an DirectLink or Form, when its URL is triggered.

Specified by:
actionTriggered in interface IActionListener
Parameters:
component - The component which was "triggered".
cycle - The request cycle in which the component was triggered.

getMethodName

public String getMethodName()
Description copied from interface: IActionListener
The actual method name that this listener represents.

Specified by:
getMethodName in interface IActionListener
Returns:
The method name this listener is bound to.

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.