KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > mmbase > applications > community > taglib > GetInfoTEI


1 /*
2
3 This software is OSI Certified Open Source Software.
4 OSI Certified is a certification mark of the Open Source Initiative.
5
6 The license (Mozilla version 1.0) can be read at the MMBase site.
7 See http://www.MMBase.org/license
8
9 */

10 package org.mmbase.applications.community.taglib;
11
12 import javax.servlet.jsp.tagext.VariableInfo JavaDoc;
13 import javax.servlet.jsp.tagext.TagData JavaDoc;
14 import javax.servlet.jsp.tagext.TagExtraInfo JavaDoc;
15
16 /**
17  * The GetInfo tag can optionally export one jsp variable.
18  *
19  * @author Pierre van Rooden
20  * @version $Id: GetInfoTEI.java,v 1.4 2003/06/18 20:03:57 michiel Exp $
21  */

22  
23 public class GetInfoTEI extends TagExtraInfo JavaDoc {
24
25     public GetInfoTEI() {
26         super();
27     }
28
29     public VariableInfo JavaDoc[] getVariableInfo(TagData JavaDoc data) {
30         String JavaDoc jspvarAttribute = (String JavaDoc) data.getAttribute("jspvar");
31         if (jspvarAttribute==null) {
32             return new VariableInfo JavaDoc[0];
33         } else {
34             VariableInfo JavaDoc[] variableInfo = new VariableInfo JavaDoc[1];
35             variableInfo[0] = new VariableInfo JavaDoc(jspvarAttribute,
36                                             "java.lang.String",
37                                             true,
38                                             VariableInfo.NESTED);
39             return variableInfo;
40         }
41     }
42 }
43
Popular Tags