1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 package org.apache.struts.taglib.nested;
22
23 import javax.servlet.jsp.tagext.TagData;
24 import javax.servlet.jsp.tagext.TagExtraInfo;
25 import javax.servlet.jsp.tagext.VariableInfo;
26
27 /**
28 * NestedWriteNestingTei
29 *
30 * This class will allow the nested:writeNesting tag to actually do what the
31 * doc says and make a scripting variable as an option (when "id" is
32 * supplied).
33 *
34 * @version $Rev: 471754 $
35 * @since Struts 1.2
36 */
37 public class NestedWriteNestingTei extends TagExtraInfo {
38 /**
39 * Return information about the scripting variables to be created.
40 */
41 public VariableInfo[] getVariableInfo(TagData data) {
42
43 String id = data.getAttributeString("id");
44
45 VariableInfo[] vi = null;
46
47 if (id != null) {
48 vi = new VariableInfo[1];
49 vi[0] =
50 new VariableInfo(id, "java.lang.String", true,
51 VariableInfo.AT_END);
52 } else {
53 vi = new VariableInfo[0];
54 }
55
56
57 return vi;
58 }
59 }