1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.myfaces.taglib.core;
20
21 import javax.el.ValueExpression;
22 import javax.faces.component.ActionSource;
23 import javax.faces.event.ActionListener;
24
25 import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFJspAttribute;
26 import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFJspTag;
27
28
29
30
31
32
33
34
35
36
37 @JSFJspTag(name = "f:actionListener", bodyContent = "empty")
38 public class ActionListenerTag extends GenericListenerTag<ActionSource, ActionListener>
39 {
40 private static final long serialVersionUID = -2021978765020549175L;
41
42 public ActionListenerTag()
43 {
44 super(ActionSource.class);
45 }
46
47 @Override
48 protected void addListener(ActionSource actionSource, ActionListener actionListener)
49 {
50 actionSource.addActionListener(actionListener);
51 }
52
53 @Override
54 protected ActionListener createDelegateListener(ValueExpression type, ValueExpression binding)
55 {
56 return new DelegateActionListener(type, binding);
57 }
58
59
60
61
62 @Override
63 @JSFJspAttribute(className="javax.el.ValueExpression",
64 deferredValueType="java.lang.String")
65 public void setType(ValueExpression type)
66 {
67 super.setType(type);
68 }
69
70
71
72
73 @Override
74 @JSFJspAttribute(className="javax.el.ValueExpression",
75 deferredValueType="javax.faces.event.ActionListener")
76 public void setBinding(ValueExpression binding)
77 {
78 super.setBinding(binding);
79 }
80 }