|
1 |
| |
|
2 |
| |
|
3 |
| |
|
4 |
| |
|
5 |
| |
|
6 |
| |
|
7 |
| |
|
8 |
| |
|
9 |
| |
|
10 |
| |
|
11 |
| |
|
12 |
| |
|
13 |
| |
|
14 |
| |
|
15 |
| package org.apache.tapestry.link; |
|
16 |
| |
|
17 |
| import org.apache.tapestry.IAction; |
|
18 |
| import org.apache.tapestry.IActionListener; |
|
19 |
| import org.apache.tapestry.IRequestCycle; |
|
20 |
| import org.apache.tapestry.RenderRewoundException; |
|
21 |
| import org.apache.tapestry.engine.ActionServiceParameter; |
|
22 |
| import org.apache.tapestry.engine.IEngineService; |
|
23 |
| import org.apache.tapestry.engine.ILink; |
|
24 |
| import org.apache.tapestry.listener.ListenerInvoker; |
|
25 |
| |
|
26 |
| |
|
27 |
| |
|
28 |
| |
|
29 |
| |
|
30 |
| |
|
31 |
| |
|
32 |
| |
|
33 |
| |
|
34 |
| public abstract class ActionLink extends AbstractLinkComponent implements IAction |
|
35 |
| { |
|
36 |
| public abstract boolean isStateful(); |
|
37 |
| |
|
38 |
| |
|
39 |
| |
|
40 |
| |
|
41 |
| |
|
42 |
| |
|
43 |
| |
|
44 |
| |
|
45 |
| |
|
46 |
3
| public boolean getRequiresSession()
|
|
47 |
| { |
|
48 |
3
| return isStateful();
|
|
49 |
| } |
|
50 |
| |
|
51 |
3
| public ILink getLink(IRequestCycle cycle)
|
|
52 |
| { |
|
53 |
3
| String actionId = cycle.getNextActionId();
|
|
54 |
| |
|
55 |
3
| if (cycle.isRewound(this))
|
|
56 |
| { |
|
57 |
0
| getListenerInvoker().invokeListener(getListener(), this, cycle);
|
|
58 |
| |
|
59 |
0
| throw new RenderRewoundException(this);
|
|
60 |
| } |
|
61 |
| |
|
62 |
3
| return getActionService().getLink(false, new ActionServiceParameter(this, actionId));
|
|
63 |
| } |
|
64 |
| |
|
65 |
| public abstract IActionListener getListener(); |
|
66 |
| |
|
67 |
| public abstract ListenerInvoker getListenerInvoker(); |
|
68 |
| |
|
69 |
| |
|
70 |
| |
|
71 |
| |
|
72 |
| |
|
73 |
| |
|
74 |
| public abstract IEngineService getActionService(); |
|
75 |
| } |