org.apache.beehive.netui.tags.databinding.invoke
Class CallPageFlow

Object
  extended by TagSupport
      extended by BodyTagSupport
          extended by AbstractClassicTag
              extended by AbstractCallMethod
                  extended by CallMethod
                      extended by CallPageFlow
All Implemented Interfaces:
Serializable, BodyTag, IterationTag, JspTag, Tag, INetuiTag

public class CallPageFlow
extends CallMethod

A tag that is used to call a method on the current PageFlowController. The PageFlow on which to call the method is found given the location of the JSP page in the webapp; if no PageFlow is found in the current directory, an ObjectNotFoundException is thrown and the tag execution fails.

This tag extends the CallMethod tag, which defines additional attributes.

Once the method has been called, any return value is set in the PageContext attribute map under the resultId attribute that is provided on the CallMethod tag. In the case that the return value is a primitive type, the primitive type's object wrapper is set in the PageContext under the resultId key.

See Also:
Serialized Form
Example
In the following sample, the <netui-data:callPageFlow> tag calls the sumCartItems method on the Controller file. The Label tag accesses the result through the {pageContext...} data binding context.
     <netui-data:callPageFlow method="sumCartItems" resultId="cartSum">
          <netui-data:methodParameter value="{pageFlow.cart.lineItemList}"/>
      </netui-data:callPageFlow>
      ...
      <netui:label value="{pageContext.cartSum}"/>

Nested Class Summary
 
Nested classes/interfaces inherited from class AbstractCallMethod
AbstractCallMethod.ParamNode
 
Field Summary
 
Fields inherited from class AbstractClassicTag
DefaultNamingChain, NETUI_UNIQUE_CNT
 
Fields inherited from class BodyTagSupport
bodyContent
 
Fields inherited from class TagSupport
id, pageContext
 
Fields inherited from interface BodyTag
EVAL_BODY_BUFFERED, EVAL_BODY_TAG
 
Fields inherited from interface IterationTag
EVAL_BODY_AGAIN
 
Fields inherited from interface Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
CallPageFlow()
           
 
Method Summary
protected  String getObjectName()
          Get the name of the object that is the target of the invocation.
 String getTagName()
          Get the name of this tag.
protected  Object resolveObject()
          Get the PageFlow for the using JSP's directory.
 
Methods inherited from class CallMethod
findMethod, localRelease, setObject
 
Methods inherited from class AbstractCallMethod
addParameter, allowNullInvocationTarget, doEndTag, doStartTag, getParameterNodes, handleReturnValue, setFailOnError, setMethod, setResultId
 
Methods inherited from class AbstractClassicTag
applyNamingChain, getErrorsReport, getIdForTagId, getNamingChain, getNextId, getScriptReporter, getUserLocale, hasErrors, qualifyAttribute, registerTagError, registerTagError, reportAndExit, reportErrors, rewriteName, setNonEmptyValueAttribute, setRequiredValueAttribute, write
 
Methods inherited from class BodyTagSupport
doAfterBody, doInitBody, getBodyContent, getPreviousOut, release, setBodyContent
 
Methods inherited from class TagSupport
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface Tag
getParent, setPageContext, setParent
 

Constructor Detail

CallPageFlow

public CallPageFlow()
Method Detail

getTagName

public String getTagName()
Get the name of this tag. This is used to identify the type of this tag for reporting tag errors.

Specified by:
getTagName in interface INetuiTag
Overrides:
getTagName in class CallMethod
Returns:
a constant String representing the name of this tag.

getObjectName

protected String getObjectName()
Get the name of the object that is the target of the invocation.

Overrides:
getObjectName in class CallMethod
Returns:
a name for the object on which the method will be invoked.

resolveObject

protected Object resolveObject()
                        throws ObjectNotFoundException
Get the PageFlow for the using JSP's directory. This is an implementation of the CallMethod.resolveObject() method that finds the current PageFlow using the PageFlowUtils.getCurrentPageFlow(javax.servlet.http.HttpServletRequest) method.

Overrides:
resolveObject in class CallMethod
Returns:
the current PageFlow. If there is no current PageFlow, the ObjectNotFoundException will be thrown.
Throws:
ObjectNotFoundException - when an exception occurs ensuring that a Page Flow is created.