1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 package org.apache.struts2.dojo.views.jsp.ui;
23
24 import javax.servlet.http.HttpServletRequest;
25 import javax.servlet.http.HttpServletResponse;
26
27 import org.apache.struts2.components.Component;
28 import org.apache.struts2.dojo.components.Tree;
29 import org.apache.struts2.views.jsp.ui.AbstractClosingTag;
30
31 import com.opensymphony.xwork2.util.ValueStack;
32
33 /***
34 * @see Tree
35 */
36 public class TreeTag extends AbstractClosingTag {
37
38 private static final long serialVersionUID = 2735218501058548013L;
39
40 protected String toggle;
41 protected String selectedNotifyTopics;
42 protected String expandedNotifyTopics;
43 protected String collapsedNotifyTopics;
44 protected String rootNode;
45 protected String childCollectionProperty;
46 protected String nodeTitleProperty;
47 protected String nodeIdProperty;
48 protected String showRootGrid;
49
50 protected String showGrid;
51 protected String blankIconSrc;
52 protected String gridIconSrcL;
53 protected String gridIconSrcV;
54 protected String gridIconSrcP;
55 protected String gridIconSrcC;
56 protected String gridIconSrcX;
57 protected String gridIconSrcY;
58 protected String expandIconSrcPlus;
59 protected String expandIconSrcMinus;
60 protected String iconWidth;
61 protected String iconHeight;
62 protected String toggleDuration;
63 protected String templateCssPath;
64 protected String href;
65 protected String errorNotifyTopics;
66
67 public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
68 return new Tree(stack,req,res);
69 }
70
71 protected void populateParams() {
72 super.populateParams();
73
74 Tree tree = (Tree) component;
75 tree.setChildCollectionProperty(childCollectionProperty);
76 tree.setNodeIdProperty(nodeIdProperty);
77 tree.setNodeTitleProperty(nodeTitleProperty);
78 tree.setRootNode(rootNode);
79 tree.setToggle(toggle);
80 tree.setSelectedNotifyTopics(selectedNotifyTopics);
81 tree.setExpandedNotifyTopics(expandedNotifyTopics);
82 tree.setCollapsedNotifyTopics(collapsedNotifyTopics);
83 tree.setShowRootGrid(showRootGrid);
84
85 tree.setShowGrid(showGrid);
86 tree.setBlankIconSrc(blankIconSrc);
87 tree.setGridIconSrcL(gridIconSrcC);
88 tree.setGridIconSrcV(gridIconSrcV);
89 tree.setGridIconSrcP(gridIconSrcP);
90 tree.setGridIconSrcC(gridIconSrcC);
91 tree.setGridIconSrcX(gridIconSrcX);
92 tree.setGridIconSrcY(gridIconSrcY);
93 tree.setExpandIconSrcPlus(expandIconSrcPlus);
94 tree.setExpandIconSrcMinus(expandIconSrcMinus);
95 tree.setIconWidth(iconWidth);
96 tree.setIconHeight(iconHeight);
97 tree.setToggleDuration(toggleDuration);
98 tree.setTemplateCssPath(templateCssPath);
99 tree.setHref(href);
100 tree.setErrorNotifyTopics(errorNotifyTopics);
101 }
102
103 public String getToggle() {
104 return toggle;
105 }
106
107 public void setToggle(String toggle) {
108 this.toggle = toggle;
109 }
110
111 @Deprecated
112 public void setTreeSelectedTopic(String treeSelectedTopic) {
113 this.selectedNotifyTopics = treeSelectedTopic;
114 }
115
116 @Deprecated
117 public void setTreeExpandedTopic(String treeExpandedTopic) {
118 this.expandedNotifyTopics = treeExpandedTopic;
119 }
120
121 @Deprecated
122 public void setTreeCollapsedTopic(String treeCollapsedTopic) {
123 this.collapsedNotifyTopics = treeCollapsedTopic;
124 }
125
126 public String getRootNode() {
127 return rootNode;
128 }
129
130 public void setRootNode(String rootNode) {
131 this.rootNode = rootNode;
132 }
133
134 public String getChildCollectionProperty() {
135 return childCollectionProperty;
136 }
137
138 public void setChildCollectionProperty(String childCollectionProperty) {
139 this.childCollectionProperty = childCollectionProperty;
140 }
141
142 public String getNodeTitleProperty() {
143 return nodeTitleProperty;
144 }
145
146 public void setNodeTitleProperty(String nodeTitleProperty) {
147 this.nodeTitleProperty = nodeTitleProperty;
148 }
149
150 public String getNodeIdProperty() {
151 return nodeIdProperty;
152 }
153
154 public void setNodeIdProperty(String nodeIdProperty) {
155 this.nodeIdProperty = nodeIdProperty;
156 }
157
158 public String getShowRootGrid() {
159 return showRootGrid;
160 }
161
162 public void setShowRootGrid(String showRootGrid) {
163 this.showRootGrid = showRootGrid;
164 }
165
166 public String getBlankIconSrc() {
167 return blankIconSrc;
168 }
169
170 public void setBlankIconSrc(String blankIconSrc) {
171 this.blankIconSrc = blankIconSrc;
172 }
173
174 public String getExpandIconSrcMinus() {
175 return expandIconSrcMinus;
176 }
177
178 public void setExpandIconSrcMinus(String expandIconSrcMinus) {
179 this.expandIconSrcMinus = expandIconSrcMinus;
180 }
181
182 public String getExpandIconSrcPlus() {
183 return expandIconSrcPlus;
184 }
185
186 public void setExpandIconSrcPlus(String expandIconSrcPlus) {
187 this.expandIconSrcPlus = expandIconSrcPlus;
188 }
189
190 public String getGridIconSrcC() {
191 return gridIconSrcC;
192 }
193
194 public void setGridIconSrcC(String gridIconSrcC) {
195 this.gridIconSrcC = gridIconSrcC;
196 }
197
198 public String getGridIconSrcL() {
199 return gridIconSrcL;
200 }
201
202 public void setGridIconSrcL(String gridIconSrcL) {
203 this.gridIconSrcL = gridIconSrcL;
204 }
205
206 public String getGridIconSrcP() {
207 return gridIconSrcP;
208 }
209
210 public void setGridIconSrcP(String gridIconSrcP) {
211 this.gridIconSrcP = gridIconSrcP;
212 }
213
214 public String getGridIconSrcV() {
215 return gridIconSrcV;
216 }
217
218 public void setGridIconSrcV(String gridIconSrcV) {
219 this.gridIconSrcV = gridIconSrcV;
220 }
221
222 public String getGridIconSrcX() {
223 return gridIconSrcX;
224 }
225
226 public void setGridIconSrcX(String gridIconSrcX) {
227 this.gridIconSrcX = gridIconSrcX;
228 }
229
230 public String getGridIconSrcY() {
231 return gridIconSrcY;
232 }
233
234 public void setGridIconSrcY(String gridIconSrcY) {
235 this.gridIconSrcY = gridIconSrcY;
236 }
237
238 public String getIconHeight() {
239 return iconHeight;
240 }
241
242 public void setIconHeight(String iconHeight) {
243 this.iconHeight = iconHeight;
244 }
245
246 public String getIconWidth() {
247 return iconWidth;
248 }
249
250 public void setIconWidth(String iconWidth) {
251 this.iconWidth = iconWidth;
252 }
253
254 public String getTemplateCssPath() {
255 return templateCssPath;
256 }
257
258 public void setTemplateCssPath(String templateCssPath) {
259 this.templateCssPath = templateCssPath;
260 }
261
262 public String getToggleDuration() {
263 return toggleDuration;
264 }
265
266 public void setToggleDuration(String toggleDuration) {
267 this.toggleDuration = toggleDuration;
268 }
269
270 public String getShowGrid() {
271 return showGrid;
272 }
273
274 public void setShowGrid(String showGrid) {
275 this.showGrid = showGrid;
276 }
277
278 public void setCollapsedNotifyTopics(String collapsedNotifyTopics) {
279 this.collapsedNotifyTopics = collapsedNotifyTopics;
280 }
281
282 public void setExpandedNotifyTopics(String expandedNotifyTopics) {
283 this.expandedNotifyTopics = expandedNotifyTopics;
284 }
285
286 public void setSelectedNotifyTopics(String selectedNotifyTopics) {
287 this.selectedNotifyTopics = selectedNotifyTopics;
288 }
289
290 public void setHref(String href) {
291 this.href = href;
292 }
293
294 public void setErrorNotifyTopics(String errorNotifyTopics) {
295 this.errorNotifyTopics = errorNotifyTopics;
296 }
297 }
298