01: /*
02: * Title: UsePageTEI
03: * Description:
04: *
05: * This software is published under the terms of the OpenSymphony Software
06: * License version 1.1, of which a copy has been included with this
07: * distribution in the LICENSE.txt file.
08: */
09:
10: package com.opensymphony.module.sitemesh.taglib.decorator;
11:
12: import javax.servlet.jsp.tagext.TagData;
13: import javax.servlet.jsp.tagext.TagExtraInfo;
14: import javax.servlet.jsp.tagext.VariableInfo;
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 {
26: protected String getType() {
27: return "com.opensymphony.module.sitemesh.Page";
28: }
29:
30: public VariableInfo[] getVariableInfo(TagData data) {
31: String id = data.getAttributeString("id");
32: return new VariableInfo[] { new VariableInfo(id, getType(),
33: true, VariableInfo.AT_END) };
34: }
35: }
|