it.eng.spagobi.commons.presentation.tags
Class SpagoBIMessageTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by it.eng.spagobi.commons.presentation.tags.SpagoBIMessageTag
All Implemented Interfaces:
java.io.Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag

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

Custom tag that retrieves message using spago facilities

Author:
zoppello
See Also:
Serialized Form

Field Summary
protected  java.lang.String args
          The arguments.
protected  java.lang.String bundle
          The servlet context attribute key for our resources.
protected  java.lang.String key
          The message key of the message to be retrieved.
 
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
SpagoBIMessageTag()
           
 
Method Summary
 int doStartTag()
          Process the start tag.
 java.lang.String getArgs()
          Gets the args.
 java.lang.String getBundle()
          Gets the bundle.
 java.lang.String getKey()
          Gets the key.
 void release()
          Release any acquired resources.
protected  java.lang.String replace(java.lang.String messageFormat, int iParameter, java.lang.Object value)
          Substitutes the message value to the placeholders.
 void setArgs(java.lang.String args)
          Sets the args.
 void setBundle(java.lang.String bundle)
          Sets the bundle.
 void setKey(java.lang.String key)
          Sets the key.
 
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

args

protected java.lang.String args
The arguments.


key

protected java.lang.String key
The message key of the message to be retrieved.


bundle

protected java.lang.String bundle
The servlet context attribute key for our resources.

Constructor Detail

SpagoBIMessageTag

public SpagoBIMessageTag()
Method Detail

getArgs

public java.lang.String getArgs()
Gets the args.

Returns:
The arguments

setArgs

public void setArgs(java.lang.String args)
Sets the args.

Parameters:
args - The arguments to set

getBundle

public java.lang.String getBundle()
Gets the bundle.

Returns:
The servlet context attribute key

setBundle

public void setBundle(java.lang.String bundle)
Sets the bundle.

Parameters:
bundle - The servlet context attribute key to set

getKey

public java.lang.String getKey()
Gets the key.

Returns:
The reference key

setKey

public void setKey(java.lang.String key)
Sets the key.

Parameters:
key - The key to set

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspException
Process the start tag.

Specified by:
doStartTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doStartTag in class javax.servlet.jsp.tagext.TagSupport
Returns:
the int
Throws:
javax.servlet.jsp.JspException - the jsp exception
javax.servlet.jsp.JspException - if a JSP exception has occurred

release

public void release()
Release any acquired resources.

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

replace

protected java.lang.String replace(java.lang.String messageFormat,
                                   int iParameter,
                                   java.lang.Object value)
Substitutes the message value to the placeholders.

Parameters:
messageFormat - The String representing the message format
iParameter - The numeric value defining the replacing string
value - Input object containing parsing information
Returns:
The parsed string