org.appfuse.webapp.taglib
Class ConstantsTag

java.lang.Object
  extended byjavax.servlet.jsp.tagext.TagSupport
      extended byorg.appfuse.webapp.taglib.ConstantsTag
All Implemented Interfaces:
IterationTag, JspTag, Serializable, Tag

public class ConstantsTag
extends TagSupport

This class is designed to put all the public variables in a class to a specified scope - designed for exposing a Constants class to Tag Libraries.

It is designed to be used as follows:

<tag:constants />

Optional values are "className" (fully qualified) and "scope".

View Source

Version:
$Revision: 1.1 $ $Date: 2004/03/31 13:04:29 $
Author:
Matt Raible
See Also:
Serialized Form
JSP Tag:
name="constants" bodycontent="empty" tei-class="org.appfuse.webapp.taglib.ConstantsTei"

Field Summary
 String clazz
          The class to expose the variables from.
protected  String scope
          The scope to be put the variable in.
protected  String var
          The single variable to expose.
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
ConstantsTag()
           
 
Method Summary
 int doStartTag()
           
 String getClassName()
           
 String getScope()
           
 String getVar()
           
 void release()
          Release all allocated resources.
 void setClassName(String clazz)
           
 void setScope(String scope)
           
 void setVar(String var)
           
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, doEndTag, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

clazz

public String clazz
The class to expose the variables from.


scope

protected String scope
The scope to be put the variable in.


var

protected String var
The single variable to expose.

Constructor Detail

ConstantsTag

public ConstantsTag()
Method Detail

doStartTag

public int doStartTag()
               throws JspException
Throws:
JspException

setClassName

public void setClassName(String clazz)
JSP Attribute:

getClassName

public String getClassName()

setScope

public void setScope(String scope)
JSP Attribute:

getScope

public String getScope()

setVar

public void setVar(String var)
JSP Attribute:

getVar

public String getVar()

release

public void release()
Release all allocated resources.



Copyright © 2002-2004