org.chwf.taglib.ji18n
Class MessageTag

java.lang.Object
  |
  +--javax.servlet.jsp.tagext.TagSupport
        |
        +--org.chwf.taglib.base.LifeCycleTagSupport
              |
              +--org.chwf.taglib.ji18n.MessageTag
All Implemented Interfaces:
Parameterized, java.io.Serializable, javax.servlet.jsp.tagext.Tag
Direct Known Subclasses:
IncludeTag

public class MessageTag
extends LifeCycleTagSupport

Tag handler for the <message> tag.

Author:
Paul Strack
See Also:
Serialized Form

Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
MessageTag()
           
 
Method Summary
 void addParameter(java.lang.String name, java.lang.String value)
          Add a tag attribute.
 void cleanup()
          Clean up data for tag handler reuse and pooling.
 int doEnd()
          Write out the message.
 java.lang.String getKey()
          Deprecated.  
 java.lang.String getName()
          The message name.
 java.lang.String getResource()
          The resource name.
 void setKey(java.lang.String key)
          Deprecated.  
 void setName(java.lang.String name)
          The message name.
 void setResource(java.lang.String resource)
          The resource name.
 
Methods inherited from class org.chwf.taglib.base.LifeCycleTagSupport
addAttribute, doEndTag, doStart, doStartTag, getAttribute, getAttributeNames, getParameter, getParameterNames, init, printAttributes
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageTag

public MessageTag()
Method Detail

cleanup

public void cleanup()
Clean up data for tag handler reuse and pooling. Should be overridden in tag handler. Subclasses should always invoke their superclass's cleanup method: super.cleanup()
Overrides:
cleanup in class LifeCycleTagSupport

getKey

public java.lang.String getKey()
Deprecated.  

The message key.
Returns:
The message key.

setKey

public void setKey(java.lang.String key)
Deprecated.  

The message key.
Parameters:
key - The message key.

getName

public java.lang.String getName()
The message name.
Returns:
The message name.

setName

public void setName(java.lang.String name)
The message name.
Parameters:
name - The message name.

getResource

public java.lang.String getResource()
The resource name. Defaults to resource derived from page location.
Returns:
The resource name.

setResource

public void setResource(java.lang.String resource)
The resource name.
Parameters:
resource - The resource name.

addParameter

public void addParameter(java.lang.String name,
                         java.lang.String value)
Add a tag attribute. This method is used to manipulate generic or pass-through attributes.
Overrides:
addParameter in class LifeCycleTagSupport
Parameters:
name - The attribute name.
value - The attribute value.

doEnd

public int doEnd()
          throws javax.servlet.ServletException,
                 java.io.IOException
Write out the message.
Overrides:
doEnd in class LifeCycleTagSupport
Returns:
EVAL_PAGE
Throws:
javax.servlet.ServletException - For servlet errors.
java.io.IOException - For write errors.


Copyright © 2002-2004, Paul Strack. All Rights Reserved.