org.appfuse.webapp.taglib
Class LabelTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by org.appfuse.webapp.taglib.LabelTag
All Implemented Interfaces:
java.io.Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag

public class LabelTag
extends javax.servlet.jsp.tagext.TagSupport

This class is designed to render a

It is designed to be used as follows:

<tag:label key="userForm.username"/>

See Also:
Serialized Form

Field Summary
protected  boolean colon
           
protected  java.lang.String errorClass
           
protected  java.lang.String key
           
protected  org.apache.commons.logging.Log log
           
protected  org.springframework.web.servlet.support.RequestContext requestContext
           
protected  java.lang.String styleClass
           
 
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
LabelTag()
           
 
Method Summary
 int doStartTag()
           
 void release()
          Release all allocated resources.
 void setColon(boolean colon)
          Setter for specifying whether to include colon
 void setErrorClass(java.lang.String errorClass)
          Setter for assigning a CSS class when errors occur, defaults to labelError.
 void setKey(java.lang.String key)
           
 void setStyleClass(java.lang.String styleClass)
          Setter for assigning a CSS class, default is label.
protected  void writeMessage(java.lang.String msg)
          Write the message to the page.
 
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

requestContext

protected org.springframework.web.servlet.support.RequestContext requestContext

log

protected final transient org.apache.commons.logging.Log log

key

protected java.lang.String key

styleClass

protected java.lang.String styleClass

errorClass

protected java.lang.String errorClass

colon

protected boolean colon
Constructor Detail

LabelTag

public LabelTag()
Method Detail

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspException
Specified by:
doStartTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doStartTag in class javax.servlet.jsp.tagext.TagSupport
Throws:
javax.servlet.jsp.JspException

writeMessage

protected void writeMessage(java.lang.String msg)
                     throws java.io.IOException
Write the message to the page.

Parameters:
msg - the message to write
Throws:
java.io.IOException - if writing failed

setKey

public void setKey(java.lang.String key)

setColon

public void setColon(boolean colon)
Setter for specifying whether to include colon


setStyleClass

public void setStyleClass(java.lang.String styleClass)
Setter for assigning a CSS class, default is label.


setErrorClass

public void setErrorClass(java.lang.String errorClass)
Setter for assigning a CSS class when errors occur, defaults to labelError.


release

public void release()
Release all allocated resources.

Specified by:
release in interface javax.servlet.jsp.tagext.Tag
Overrides:
release in class javax.servlet.jsp.tagext.TagSupport


Copyright © 2003-2007. All Rights Reserved.