01: // Copyright 2006, 2007 The Apache Software Foundation
02: //
03: // Licensed under the Apache License, Version 2.0 (the "License");
04: // you may not use this file except in compliance with the License.
05: // You may obtain a copy of the License at
06: //
07: // http://www.apache.org/licenses/LICENSE-2.0
08: //
09: // 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.services;
16:
17: import org.apache.tapestry.corelib.components.ActionLink;
18: import org.apache.tapestry.corelib.components.Form;
19:
20: /**
21: * Handler interface for action requests. Action requests <em>do things</em> such as process a
22: * form submission or otherwise change state. In the majority of cases, after the action, a redirect
23: * response is sent to the client which, in turn, causes a page render.
24: *
25: * @see ActionLink
26: * @see Form
27: * @see ComponentActionRequestFilter
28: */
29: public interface ComponentActionRequestHandler {
30: /**
31: * Handler for a component action request, which returns a response generator used to send the
32: * final response to the client.
33: *
34: * @param logicalPageName
35: * the page name containing the component, and the default component to render the
36: * response
37: * @param nestedComponentId
38: * the id of the component within the page
39: * @param eventType
40: * the type of event to trigger on the component
41: * @param context
42: * context information to provide to the event handler
43: * @parram activationContext activation context for the page
44: */
45: ActionResponseGenerator handle(String logicalPageName,
46: String nestedComponentId, String eventType,
47: String[] context, String[] activationContext);
48: }
|