001: /*
002: * Copyright (c) 2005 Opensymphony. All Rights Reserved.
003: */
004: package com.opensymphony.webwork.views.jsp.ui;
005:
006: import com.opensymphony.webwork.components.Component;
007: import com.opensymphony.webwork.components.Tree;
008: import com.opensymphony.xwork.util.OgnlValueStack;
009:
010: import javax.servlet.http.HttpServletRequest;
011: import javax.servlet.http.HttpServletResponse;
012:
013: /**
014: * @see Tree
015: * @author Jason Carreira <jcarreira@eplus.com>
016: * @author tm_jee
017: */
018: public class TreeTag extends AbstractClosingTag {
019:
020: private static final long serialVersionUID = -5175241458498157760L;
021:
022: private String toggle;
023: private String treeSelectedTopic;
024: private String treeExpandedTopic;
025: private String treeCollapsedTopic;
026: private String rootNode;
027: private String childCollectionProperty;
028: private String nodeTitleProperty;
029: private String nodeIdProperty;
030: private String showRootGrid;
031:
032: private String showGrid;
033: private String blankIconSrc;
034: private String gridIconSrcL;
035: private String gridIconSrcV;
036: private String gridIconSrcP;
037: private String gridIconSrcC;
038: private String gridIconSrcX;
039: private String gridIconSrcY;
040: private String expandIconSrcPlus;
041: private String expandIconSrcMinus;
042: private String iconWidth;
043: private String iconHeight;
044: private String toggleDuration;
045: private String templateCssPath;
046:
047: public Component getBean(OgnlValueStack stack,
048: HttpServletRequest req, HttpServletResponse res) {
049: return new Tree(stack, req, res);
050: }
051:
052: protected void populateParams() {
053: super .populateParams();
054:
055: Tree tree = (Tree) component;
056: if (childCollectionProperty != null)
057: tree.setChildCollectionProperty(childCollectionProperty);
058: if (nodeIdProperty != null)
059: tree.setNodeIdProperty(nodeIdProperty);
060: if (nodeTitleProperty != null)
061: tree.setNodeTitleProperty(nodeTitleProperty);
062: if (rootNode != null)
063: tree.setRootNode(rootNode);
064: if (toggle != null)
065: tree.setToggle(toggle);
066: if (treeCollapsedTopic != null)
067: tree.setTreeCollapsedTopic(treeCollapsedTopic);
068: if (treeExpandedTopic != null)
069: tree.setTreeExpandedTopic(treeExpandedTopic);
070: if (treeSelectedTopic != null)
071: tree.setTreeSelectedTopic(treeSelectedTopic);
072: if (showRootGrid != null)
073: tree.setShowRootGrid(showRootGrid);
074:
075: if (showGrid != null)
076: tree.setShowGrid(showGrid);
077: if (blankIconSrc != null)
078: tree.setBlankIconSrc(blankIconSrc);
079: if (gridIconSrcL != null)
080: tree.setGridIconSrcL(gridIconSrcC);
081: if (gridIconSrcV != null)
082: tree.setGridIconSrcV(gridIconSrcV);
083: if (gridIconSrcP != null)
084: tree.setGridIconSrcP(gridIconSrcP);
085: if (gridIconSrcC != null)
086: tree.setGridIconSrcC(gridIconSrcC);
087: if (gridIconSrcX != null)
088: tree.setGridIconSrcX(gridIconSrcX);
089: if (gridIconSrcY != null)
090: tree.setGridIconSrcY(gridIconSrcY);
091: if (expandIconSrcPlus != null)
092: tree.setExpandIconSrcPlus(expandIconSrcPlus);
093: if (expandIconSrcMinus != null)
094: tree.setExpandIconSrcMinus(expandIconSrcMinus);
095: if (iconWidth != null)
096: tree.setIconWidth(iconWidth);
097: if (iconHeight != null)
098: tree.setIconHeight(iconHeight);
099: if (toggleDuration != null)
100: tree.setToggleDuration(toggleDuration);
101: if (templateCssPath != null)
102: tree.setTemplateCssPath(templateCssPath);
103: }
104:
105: public String getToggle() {
106: return toggle;
107: }
108:
109: public void setToggle(String toggle) {
110: this .toggle = toggle;
111: }
112:
113: public String getTreeSelectedTopic() {
114: return treeSelectedTopic;
115: }
116:
117: public void setTreeSelectedTopic(String treeSelectedTopic) {
118: this .treeSelectedTopic = treeSelectedTopic;
119: }
120:
121: public String getTreeExpandedTopic() {
122: return treeExpandedTopic;
123: }
124:
125: public void setTreeExpandedTopic(String treeExpandedTopic) {
126: this .treeExpandedTopic = treeExpandedTopic;
127: }
128:
129: public String getTreeCollapsedTopic() {
130: return treeCollapsedTopic;
131: }
132:
133: public void setTreeCollapsedTopic(String treeCollapsedTopic) {
134: this .treeCollapsedTopic = treeCollapsedTopic;
135: }
136:
137: public String getRootNode() {
138: return rootNode;
139: }
140:
141: public void setRootNode(String rootNode) {
142: this .rootNode = rootNode;
143: }
144:
145: public String getChildCollectionProperty() {
146: return childCollectionProperty;
147: }
148:
149: public void setChildCollectionProperty(
150: String childCollectionProperty) {
151: this .childCollectionProperty = childCollectionProperty;
152: }
153:
154: public String getNodeTitleProperty() {
155: return nodeTitleProperty;
156: }
157:
158: public void setNodeTitleProperty(String nodeTitleProperty) {
159: this .nodeTitleProperty = nodeTitleProperty;
160: }
161:
162: public String getNodeIdProperty() {
163: return nodeIdProperty;
164: }
165:
166: public void setNodeIdProperty(String nodeIdProperty) {
167: this .nodeIdProperty = nodeIdProperty;
168: }
169:
170: public String getShowRootGrid() {
171: return showRootGrid;
172: }
173:
174: public void setShowRootGrid(String showRootGrid) {
175: this .showRootGrid = showRootGrid;
176: }
177:
178: public String getBlankIconSrc() {
179: return blankIconSrc;
180: }
181:
182: public void setBlankIconSrc(String blankIconSrc) {
183: this .blankIconSrc = blankIconSrc;
184: }
185:
186: public String getExpandIconSrcMinus() {
187: return expandIconSrcMinus;
188: }
189:
190: public void setExpandIconSrcMinus(String expandIconSrcMinus) {
191: this .expandIconSrcMinus = expandIconSrcMinus;
192: }
193:
194: public String getExpandIconSrcPlus() {
195: return expandIconSrcPlus;
196: }
197:
198: public void setExpandIconSrcPlus(String expandIconSrcPlus) {
199: this .expandIconSrcPlus = expandIconSrcPlus;
200: }
201:
202: public String getGridIconSrcC() {
203: return gridIconSrcC;
204: }
205:
206: public void setGridIconSrcC(String gridIconSrcC) {
207: this .gridIconSrcC = gridIconSrcC;
208: }
209:
210: public String getGridIconSrcL() {
211: return gridIconSrcL;
212: }
213:
214: public void setGridIconSrcL(String gridIconSrcL) {
215: this .gridIconSrcL = gridIconSrcL;
216: }
217:
218: public String getGridIconSrcP() {
219: return gridIconSrcP;
220: }
221:
222: public void setGridIconSrcP(String gridIconSrcP) {
223: this .gridIconSrcP = gridIconSrcP;
224: }
225:
226: public String getGridIconSrcV() {
227: return gridIconSrcV;
228: }
229:
230: public void setGridIconSrcV(String gridIconSrcV) {
231: this .gridIconSrcV = gridIconSrcV;
232: }
233:
234: public String getGridIconSrcX() {
235: return gridIconSrcX;
236: }
237:
238: public void setGridIconSrcX(String gridIconSrcX) {
239: this .gridIconSrcX = gridIconSrcX;
240: }
241:
242: public String getGridIconSrcY() {
243: return gridIconSrcY;
244: }
245:
246: public void setGridIconSrcY(String gridIconSrcY) {
247: this .gridIconSrcY = gridIconSrcY;
248: }
249:
250: public String getIconHeight() {
251: return iconHeight;
252: }
253:
254: public void setIconHeight(String iconHeight) {
255: this .iconHeight = iconHeight;
256: }
257:
258: public String getIconWidth() {
259: return iconWidth;
260: }
261:
262: public void setIconWidth(String iconWidth) {
263: this .iconWidth = iconWidth;
264: }
265:
266: public String getTemplateCssPath() {
267: return templateCssPath;
268: }
269:
270: public void setTemplateCssPath(String templateCssPath) {
271: this .templateCssPath = templateCssPath;
272: }
273:
274: public String getToggleDuration() {
275: return toggleDuration;
276: }
277:
278: public void setToggleDuration(String toggleDuration) {
279: this .toggleDuration = toggleDuration;
280: }
281:
282: public String getShowGrid() {
283: return showGrid;
284: }
285:
286: public void setShowGrid(String showGrid) {
287: this.showGrid = showGrid;
288: }
289: }
|