KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > inversoft > verge > mvc > view > jsp > model > UseBeanTei


1 /*
2  * Copyright (c) 2003, Inversoft
3  *
4  * This software is distribuable under the GNU Lesser General Public License.
5  * For more information visit gnu.org.
6  */

7 package com.inversoft.verge.mvc.view.jsp.model;
8
9
10 import javax.servlet.jsp.tagext.TagData JavaDoc;
11 import javax.servlet.jsp.tagext.TagExtraInfo JavaDoc;
12 import javax.servlet.jsp.tagext.VariableInfo JavaDoc;
13
14
15 /**
16  * The tag extra info for the Inversoft useBean tag.
17  *
18  * @author Brian Pontarelli
19  * @since 2.0
20  * @version 2.0
21  */

22 public class UseBeanTei extends TagExtraInfo JavaDoc {
23
24     /**
25      * Returns the variable information for the bean being used on the page
26      *
27      * @param tagData Contains the tag's data
28      * @return The array of variable information objects (just one) for the bean
29      * being used
30      */

31     public VariableInfo JavaDoc[] getVariableInfo(TagData JavaDoc tagData) {
32         String JavaDoc var = tagData.getAttributeString("var");
33         String JavaDoc className = tagData.getAttributeString("type");
34         return new VariableInfo JavaDoc [] {
35             new VariableInfo JavaDoc(var, className, true, VariableInfo.AT_BEGIN)
36         };
37     }
38 }
39
Popular Tags