org.apache.tapestry.binding
Class ListenerMethodBinding

java.lang.Object
  extended by org.apache.tapestry.binding.AbstractBinding
      extended by org.apache.tapestry.binding.ListenerMethodBinding
All Implemented Interfaces:
org.apache.hivemind.Locatable, IActionListener, IBinding

public class ListenerMethodBinding
extends AbstractBinding
implements IActionListener

Since:
4.0
Author:
Howard M. Lewis Ship

Constructor Summary
ListenerMethodBinding(java.lang.String description, ValueConverter valueConverter, org.apache.hivemind.Location location, IComponent component, java.lang.String methodName)
           
 
Method Summary
 void actionTriggered(IComponent component, IRequestCycle cycle)
          Method invoked by the component (an ActionLink or Form, when its URL is triggered.
protected  void extendDescription(java.lang.StringBuffer buffer)
          Does nothing, subclasses may override to add additional information.
 java.lang.Object getComponent()
          Returns the component to which this binding is connected; this is currently only used when building certain exceptions.
 java.lang.Object getObject()
          Returns this binding object; the binding object delegates to the actual listener.
 
Methods inherited from class org.apache.tapestry.binding.AbstractBinding
createReadOnlyBindingException, getDescription, getLocation, getObject, getValueConverter, isInvariant, setObject, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ListenerMethodBinding

public ListenerMethodBinding(java.lang.String description,
                             ValueConverter valueConverter,
                             org.apache.hivemind.Location location,
                             IComponent component,
                             java.lang.String methodName)
Method Detail

getComponent

public java.lang.Object getComponent()
Description copied from class: AbstractBinding
Returns the component to which this binding is connected; this is currently only used when building certain exceptions. This implementation returns null.

Overrides:
getComponent in class AbstractBinding

getObject

public java.lang.Object getObject()
Returns this binding object; the binding object delegates to the actual listener. This allows us to intercept errors and report the location of the binding.

Specified by:
getObject in interface IBinding

actionTriggered

public void actionTriggered(IComponent component,
                            IRequestCycle cycle)
Description copied from interface: IActionListener
Method invoked by the component (an ActionLink 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.

extendDescription

protected void extendDescription(java.lang.StringBuffer buffer)
Description copied from class: AbstractBinding
Does nothing, subclasses may override to add additional information.

Overrides:
extendDescription in class AbstractBinding