org.apache.tapestry.annotations
Annotation Type EventListener


@Target(value=METHOD)
@Retention(value=RUNTIME)
@Documented
public @interface EventListener

Annotation used to connect an event on a component / page with a particular listener method. This is currently intended to be used to connect client side events to listener methods but may have uses elsewhere.

Author:
jkuhnert

Required Element Summary
 String[] events
          The list of events that should cause this listener to invoke.
 
Optional Element Summary
 boolean async
          If used in conjunction with submitForm(), will either submit the form normally or asynchronously.
 String[] elements
          The unique html element ids to listen to the events on.
 String submitForm
          The form id of the form that should have its data submitted when one of the specified events is triggered.
 String[] targets
          The unique IComponent ids of the targeted sources that this listener will be listening to events on.
 boolean validateForm
          Whether or not to perform form validation if the #form() parameter has been set.
 

Element Detail

events

public abstract String[] events
The list of events that should cause this listener to invoke. Ie events = {"onClick", "onOptionSelect"} etc..

targets

public abstract String[] targets
The unique IComponent ids of the targeted sources that this listener will be listening to events on.

Default:
{}

elements

public abstract String[] elements
The unique html element ids to listen to the events on.

Default:
{}

submitForm

public abstract String submitForm
The form id of the form that should have its data submitted when one of the specified events is triggered.

Returns:
Default:
""

validateForm

public abstract boolean validateForm
Whether or not to perform form validation if the #form() parameter has been set. Default is false.

Returns:
Default:
false

async

public abstract boolean async
If used in conjunction with submitForm(), will either submit the form normally or asynchronously. Default is asyncrhonous.

Returns:
True if form should be submitted asynchronously, false otherwise.
Default:
true


Copyright © 2006 Apache Software Foundation. All Rights Reserved.