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