org.figure8.join.control.taglib
Class GetResultTag
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
javax.servlet.jsp.tagext.BodyTagSupport
org.figure8.join.control.taglib.ContextTag
org.figure8.join.control.taglib.GetResultTag
- 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 GetResultTag
- extends ContextTag
This is a JSP tag that allow retrieving the result of a 1 parameter method
invokation onto a bean found in context. This result may be written on output
(using the result of the toString() method) or stored into another context
scoped bean.
This tag needs 5 mandatory parameters that are :
- name : the name of the bean to call method on,
- scope : the scope where to look for the bean called name,
- method ; the method to invoke onto the bean name,
- paramName : the name of the bean that will be the method param,
- paramScope : the scope where to look for the bean paramName.
Additionnaly, if you don't want the result to be print on page but stored
into another context bean, you may want to specify :
- resultName : the name of the bean used for storing result,
- resultScope : the context scope to use for storing bean (not specified
or empty means page context)
- Version:
- $Revision: 1.2 $
- Author:
- Laurent Broudoux
- See Also:
- Serialized Form
Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport |
bodyContent |
Fields inherited from class javax.servlet.jsp.tagext.TagSupport |
id, 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 |
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport |
doAfterBody, doEndTag, doInitBody, getBodyContent, getPreviousOut, setBodyContent |
Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
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 |
Methods inherited from interface javax.servlet.jsp.tagext.Tag |
getParent, setPageContext, setParent |
GetResultTag
public GetResultTag()
getName
public java.lang.String getName()
- Returns:
- Name of the bean to call method on.
setName
public void setName(java.lang.String name)
- Parameters:
name
- The name of the bean to call method on.
getScope
public java.lang.String getScope()
- Returns:
- The scope where we can find the bean name.
setScope
public void setScope(java.lang.String scope)
- Parameters:
scope
- The scope where we can find the bean name.
getMethod
public java.lang.String getMethod()
- Returns:
- The method to call onto bean name.
setMethod
public void setMethod(java.lang.String method)
- Parameters:
method
- The method to call onto bean name.
getParamName
public java.lang.String getParamName()
- Returns:
- The name of the bean that is the method param.
setParamName
public void setParamName(java.lang.String paramName)
- Parameters:
paramName
- The name of the bean that is the method param.
getParamScope
public java.lang.String getParamScope()
- Returns:
- The scope where we can find the bean paramName.
setParamScope
public void setParamScope(java.lang.String paramScope)
- Parameters:
paramScope
- The scope where we can find the bean paramName.
getResultName
public java.lang.String getResultName()
- Returns:
- The name of the bean where to put result of method call.
setResultName
public void setResultName(java.lang.String resultName)
- Parameters:
resultName
- The name of the bean where to put result of method call.
getResultScope
public java.lang.String getResultScope()
- Returns:
- The scope where we have to store the bean resultName.
setResultScope
public void setResultScope(java.lang.String resultScope)
- Parameters:
resultScope
- The scope where we have to store the bean resultName.
doStartTag
public int doStartTag()
throws javax.servlet.jsp.JspException
- Invoke a method onto a context bean, using another context bean
as parameter. Then, print result on output or store it into a
scoped bean (depending on the emptyness of resultName attribute)
- Specified by:
doStartTag
in interface javax.servlet.jsp.tagext.Tag
- Overrides:
doStartTag
in class javax.servlet.jsp.tagext.BodyTagSupport
- Returns:
- JSP execution code for continuing evaluation (SKIP_BODY)
- Throws:
javax.servlet.jsp.JspException
- if mandatory parameters are not provided, or exception occurs...
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.BodyTagSupport
Copyright © 2005-2008 Join. All Rights Reserved.