|
18 | 18 | */
|
19 | 19 | package org.apache.struts2.views;
|
20 | 20 |
|
21 |
| -import java.util.Arrays; |
22 |
| -import java.util.List; |
| 21 | +import com.opensymphony.xwork2.util.ValueStack; |
| 22 | +import org.apache.struts2.views.freemarker.tags.StrutsModels; |
23 | 23 |
|
24 | 24 | import javax.servlet.http.HttpServletRequest;
|
25 | 25 | import javax.servlet.http.HttpServletResponse;
|
26 | 26 |
|
27 |
| -import org.apache.struts2.views.freemarker.tags.StrutsModels; |
28 |
| -import org.apache.struts2.views.velocity.components.ActionDirective; |
29 |
| -import org.apache.struts2.views.velocity.components.ActionErrorDirective; |
30 |
| -import org.apache.struts2.views.velocity.components.ActionMessageDirective; |
31 |
| -import org.apache.struts2.views.velocity.components.AnchorDirective; |
32 |
| -import org.apache.struts2.views.velocity.components.BeanDirective; |
33 |
| -import org.apache.struts2.views.velocity.components.CheckBoxDirective; |
34 |
| -import org.apache.struts2.views.velocity.components.CheckBoxListDirective; |
35 |
| -import org.apache.struts2.views.velocity.components.ComboBoxDirective; |
36 |
| -import org.apache.struts2.views.velocity.components.ComponentDirective; |
37 |
| -import org.apache.struts2.views.velocity.components.DateDirective; |
38 |
| -import org.apache.struts2.views.velocity.components.DoubleSelectDirective; |
39 |
| -import org.apache.struts2.views.velocity.components.FieldErrorDirective; |
40 |
| -import org.apache.struts2.views.velocity.components.FileDirective; |
41 |
| -import org.apache.struts2.views.velocity.components.FormDirective; |
42 |
| -import org.apache.struts2.views.velocity.components.HeadDirective; |
43 |
| -import org.apache.struts2.views.velocity.components.HiddenDirective; |
44 |
| -import org.apache.struts2.views.velocity.components.I18nDirective; |
45 |
| -import org.apache.struts2.views.velocity.components.IncludeDirective; |
46 |
| -import org.apache.struts2.views.velocity.components.LabelDirective; |
47 |
| -import org.apache.struts2.views.velocity.components.OptionTransferSelectDirective; |
48 |
| -import org.apache.struts2.views.velocity.components.ParamDirective; |
49 |
| -import org.apache.struts2.views.velocity.components.PasswordDirective; |
50 |
| -import org.apache.struts2.views.velocity.components.PropertyDirective; |
51 |
| -import org.apache.struts2.views.velocity.components.PushDirective; |
52 |
| -import org.apache.struts2.views.velocity.components.RadioDirective; |
53 |
| -import org.apache.struts2.views.velocity.components.ResetDirective; |
54 |
| -import org.apache.struts2.views.velocity.components.SelectDirective; |
55 |
| -import org.apache.struts2.views.velocity.components.SetDirective; |
56 |
| -import org.apache.struts2.views.velocity.components.SubmitDirective; |
57 |
| -import org.apache.struts2.views.velocity.components.TextAreaDirective; |
58 |
| -import org.apache.struts2.views.velocity.components.TextDirective; |
59 |
| -import org.apache.struts2.views.velocity.components.TextFieldDirective; |
60 |
| -import org.apache.struts2.views.velocity.components.TokenDirective; |
61 |
| -import org.apache.struts2.views.velocity.components.URLDirective; |
62 |
| -import org.apache.struts2.views.velocity.components.UpDownSelectDirective; |
63 |
| - |
64 |
| -import com.opensymphony.xwork2.util.ValueStack; |
65 |
| - |
66 | 27 | /**
|
67 | 28 | * The default Struts tag library
|
68 | 29 | */
|
69 |
| -public class DefaultTagLibrary implements TagLibraryDirectiveProvider, TagLibraryModelProvider { |
| 30 | +public class DefaultTagLibrary implements TagLibraryModelProvider { |
70 | 31 |
|
71 | 32 | public Object getModels(ValueStack stack, HttpServletRequest req,
|
72 | 33 | HttpServletResponse res) {
|
73 | 34 |
|
74 | 35 | return new StrutsModels(stack, req, res);
|
75 | 36 | }
|
76 | 37 |
|
77 |
| - public List<Class> getDirectiveClasses() { |
78 |
| - Class[] directives = new Class[] { |
79 |
| - ActionDirective.class, |
80 |
| - BeanDirective.class, |
81 |
| - CheckBoxDirective.class, |
82 |
| - CheckBoxListDirective.class, |
83 |
| - ComboBoxDirective.class, |
84 |
| - ComponentDirective.class, |
85 |
| - DateDirective.class, |
86 |
| - DoubleSelectDirective.class, |
87 |
| - FileDirective.class, |
88 |
| - FormDirective.class, |
89 |
| - HeadDirective.class, |
90 |
| - HiddenDirective.class, |
91 |
| - AnchorDirective.class, |
92 |
| - I18nDirective.class, |
93 |
| - IncludeDirective.class, |
94 |
| - LabelDirective.class, |
95 |
| - ParamDirective.class, |
96 |
| - PasswordDirective.class, |
97 |
| - PushDirective.class, |
98 |
| - PropertyDirective.class, |
99 |
| - RadioDirective.class, |
100 |
| - SelectDirective.class, |
101 |
| - SetDirective.class, |
102 |
| - SubmitDirective.class, |
103 |
| - ResetDirective.class, |
104 |
| - TextAreaDirective.class, |
105 |
| - TextDirective.class, |
106 |
| - TextFieldDirective.class, |
107 |
| - TokenDirective.class, |
108 |
| - URLDirective.class, |
109 |
| - ActionErrorDirective.class, |
110 |
| - ActionMessageDirective.class, |
111 |
| - FieldErrorDirective.class, |
112 |
| - OptionTransferSelectDirective.class, |
113 |
| - UpDownSelectDirective.class |
114 |
| - }; |
115 |
| - return Arrays.asList(directives); |
116 |
| - } |
117 |
| - |
118 | 38 | public Object getFreemarkerModels(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
|
119 | 39 | return getModels(stack, req, res);
|
120 | 40 | }
|
121 | 41 |
|
122 |
| - public List<Class> getVelocityDirectiveClasses() { |
123 |
| - return getDirectiveClasses(); |
124 |
| - } |
125 |
| - |
126 | 42 | }
|
0 commit comments