Anyframe Web

anyframe.web.struts.util
Class DefaultMessagesTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by javax.servlet.jsp.tagext.BodyTagSupport
          extended by org.apache.struts.taglib.html.MessagesTag
              extended by anyframe.web.struts.util.DefaultMessagesTag
All Implemented Interfaces:
java.io.Serializable, javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag

public class DefaultMessagesTag
extends org.apache.struts.taglib.html.MessagesTag

Custom tag that iterates the elements of a message collection. It defaults to retrieving the messages from Globals.ERROR_KEY, but if the message attribute is set to true then the messages will be retrieved from Globals.MESSAGE_KEY. This is an alternative to the default ErrorsTag.

We changed org.apache.struts.taglib.html.MessagesTag Class into anyframe.web.struts.common.util.DefaultMessagesTag Class in Anyframe.

Author:
modified by Byunghun Woo
See Also:
Serialized Form

Field Summary
protected  java.lang.String name
           
protected  java.lang.String suffix
          The message resource key for errors suffix.
 
Fields inherited from class org.apache.struts.taglib.html.MessagesTag
bundle, footer, header, id, iterator, locale, message, messageResources, processed, property
 
Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport
bodyContent
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
pageContext
 
Fields inherited from interface javax.servlet.jsp.tagext.BodyTag
EVAL_BODY_BUFFERED, EVAL_BODY_TAG
 
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
DefaultMessagesTag()
           
 
Method Summary
 int doAfterBody()
          Make the next collection element available and loop, or finish the iterations if there are no more elements.
 int doStartTag()
          Construct an iterator for the specified collection, and begin looping through the body once per element.
 java.lang.String getName()
           
 java.lang.String getSuffix()
           
 void release()
          Release all allocated resources.
 void setName(java.lang.String name)
           
 void setSuffix(java.lang.String suffix)
           
 
Methods inherited from class org.apache.struts.taglib.html.MessagesTag
doEndTag, getBundle, getFooter, getHeader, getId, getLocale, getMessage, getProperty, setBundle, setFooter, setHeader, setId, setLocale, setMessage, setProperty
 
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doInitBody, getBodyContent, getPreviousOut, setBodyContent
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getParent, getValue, getValues, removeValue, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.servlet.jsp.tagext.Tag
getParent, setPageContext, setParent
 

Field Detail

name

protected java.lang.String name

suffix

protected java.lang.String suffix
The message resource key for errors suffix.

Constructor Detail

DefaultMessagesTag

public DefaultMessagesTag()
Method Detail

getName

public java.lang.String getName()
Overrides:
getName in class org.apache.struts.taglib.html.MessagesTag

setName

public void setName(java.lang.String name)
Overrides:
setName in class org.apache.struts.taglib.html.MessagesTag

getSuffix

public java.lang.String getSuffix()

setSuffix

public void setSuffix(java.lang.String suffix)

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspException
Construct an iterator for the specified collection, and begin looping through the body once per element.

Specified by:
doStartTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doStartTag in class org.apache.struts.taglib.html.MessagesTag
Throws:
javax.servlet.jsp.JspException - if a JSP exception has occurred

doAfterBody

public int doAfterBody()
                throws javax.servlet.jsp.JspException
Make the next collection element available and loop, or finish the iterations if there are no more elements.

Specified by:
doAfterBody in interface javax.servlet.jsp.tagext.IterationTag
Overrides:
doAfterBody in class org.apache.struts.taglib.html.MessagesTag
Throws:
javax.servlet.jsp.JspException - if a JSP exception has occurred

release

public void release()
Release all allocated resources.

Specified by:
release in interface javax.servlet.jsp.tagext.Tag
Overrides:
release in class org.apache.struts.taglib.html.MessagesTag

Anyframe Web

Copyright © 2008-2009 Samsung SDS. All Rights Reserved.