org.figure8.join.control.taglib
Class GetResultTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by javax.servlet.jsp.tagext.BodyTagSupport
          extended by org.figure8.join.control.taglib.ContextTag
              extended by 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 :


Additionnaly, if you don't want the result to be print on page but stored into another context bean, you may want to specify :

Version:
$Revision: 1.2 $
Author:
Laurent Broudoux
See Also:
Serialized Form

Field Summary
 
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
 
Constructor Summary
GetResultTag()
           
 
Method Summary
 int doStartTag()
          Invoke a method onto a context bean, using another context bean as parameter.
 java.lang.String getMethod()
           
 java.lang.String getName()
           
 java.lang.String getParamName()
           
 java.lang.String getParamScope()
           
 java.lang.String getResultName()
           
 java.lang.String getResultScope()
           
 java.lang.String getScope()
           
 void release()
          Release all allocated resources.
 void setMethod(java.lang.String method)
           
 void setName(java.lang.String name)
           
 void setParamName(java.lang.String paramName)
           
 void setParamScope(java.lang.String paramScope)
           
 void setResultName(java.lang.String resultName)
           
 void setResultScope(java.lang.String resultScope)
           
 void setScope(java.lang.String scope)
           
 
Methods inherited from class org.figure8.join.control.taglib.ContextTag
findBeanInScope, storeBeanInScope
 
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
 

Constructor Detail

GetResultTag

public GetResultTag()
Method Detail

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.