Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
IActionListener |
|
| 1.0;1 |
1 | // Copyright 2004, 2005 The Apache Software Foundation | |
2 | // | |
3 | // Licensed under the Apache License, Version 2.0 (the "License"); | |
4 | // you may not use this file except in compliance with the License. | |
5 | // You may obtain a copy of the License at | |
6 | // | |
7 | // http://www.apache.org/licenses/LICENSE-2.0 | |
8 | // | |
9 | // Unless required by applicable law or agreed to in writing, software | |
10 | // distributed under the License is distributed on an "AS IS" BASIS, | |
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
12 | // See the License for the specific language governing permissions and | |
13 | // limitations under the License. | |
14 | ||
15 | package org.apache.tapestry; | |
16 | ||
17 | /** | |
18 | * Defines a listener to an {@link IDirect} component, which is way to | |
19 | * get behavior when the component's URL is triggered (or the form | |
20 | * containing the component is submitted). Certain form elements | |
21 | * ({@link org.apache.tapestry.form.Hidden}) | |
22 | * also make use of this interface. | |
23 | * | |
24 | * @author Howard Lewis Ship | |
25 | * | |
26 | **/ | |
27 | ||
28 | public interface IActionListener | |
29 | { | |
30 | ||
31 | /** | |
32 | * Method invoked by the component (an {@link org.apache.tapestry.link.DirectLink} or | |
33 | * {@link org.apache.tapestry.form.Form}, when its URL is triggered. | |
34 | * | |
35 | * @param component The component which was "triggered". | |
36 | * @param cycle The request cycle in which the component was triggered. | |
37 | * | |
38 | **/ | |
39 | ||
40 | void actionTriggered(IComponent component, IRequestCycle cycle); | |
41 | ||
42 | /** | |
43 | * The actual method name that this listener represents. | |
44 | * | |
45 | * @return The method name this listener is bound to. | |
46 | */ | |
47 | String getMethodName(); | |
48 | } |