KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > opensymphony > module > sitemesh > taglib > decorator > UsePageTEI


1 /*
2  * Title: UsePageTEI
3  * Description:
4  *
5  * This software is published under the terms of the OpenSymphony Software
6  * License version 1.1, of which a copy has been included with this
7  * distribution in the LICENSE.txt file.
8  */

9
10 package com.opensymphony.module.sitemesh.taglib.decorator;
11
12 import javax.servlet.jsp.tagext.TagData JavaDoc;
13 import javax.servlet.jsp.tagext.TagExtraInfo JavaDoc;
14 import javax.servlet.jsp.tagext.VariableInfo JavaDoc;
15
16 /**
17  * TagExtraInfo implementation to expose Page object as variable.
18  *
19  * @author <a HREF="joe@truemesh.com">Joe Walnes</a>
20  * @version $Revision: 1.1 $
21  *
22  * @see UsePageTag
23  * @see UseHTMLPageTEI
24  */

25 public class UsePageTEI extends TagExtraInfo JavaDoc {
26     protected String JavaDoc getType() {
27         return "com.opensymphony.module.sitemesh.Page";
28     }
29
30     public VariableInfo JavaDoc[] getVariableInfo(TagData JavaDoc data) {
31         String JavaDoc id = data.getAttributeString("id");
32         return new VariableInfo JavaDoc[] {new VariableInfo JavaDoc(id, getType(), true, VariableInfo.AT_END)};
33     }
34 }
Popular Tags