KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > inversoft > verge > mvc > view > jsp > error > HasErrorsTei


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.error;
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  * This class contains the extra tag information for the
17  * haserrors tag. This is where the scripting variable get
18  * setup.
19  *
20  * @author Brian Pontarelli
21  */

22 public class HasErrorsTei extends TagExtraInfo JavaDoc {
23
24     /**
25      * The class name that will be used for the variable infos
26      */

27     public static final String JavaDoc OBJECT_CLASS = "java.lang.Object";
28
29
30     /**
31      * Returns the information about the index and element scripting variables
32      * so that they can be used on the page
33      */

34     public VariableInfo JavaDoc [] getVariableInfo(TagData JavaDoc data) {
35
36         VariableInfo JavaDoc[] infos = null;
37         String JavaDoc var = data.getAttributeString("var");
38         if (var != null) {
39             infos = new VariableInfo JavaDoc [] {new VariableInfo JavaDoc(var, OBJECT_CLASS,
40                 true, VariableInfo.AT_BEGIN)};
41         }
42
43         return infos;
44     }
45 }
46  
47
Popular Tags