BEA NetUI tags and APIs are included for backward compatibility only. For new applications, use the Beehive tags and APIs.

com.bea.wlw.netui.tags.databinding.invoke
Class CallPageFlow

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by javax.servlet.jsp.tagext.BodyTagSupport
          extended by com.bea.wlw.netui.tags.AbstractBaseTag
              extended by com.bea.wlw.netui.tags.databinding.invoke.AbstractCallMethod
                  extended by com.bea.wlw.netui.tags.databinding.invoke.CallMethod
                      extended by com.bea.wlw.netui.tags.databinding.invoke.CallPageFlow
All Implemented Interfaces:
HtmlConstants, Serializable, javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag

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.

Attribute Descriptions
AttributeRequiredRuntime Expression EvaluationData Bindable
failOnErrorNoNoNo
A boolean that if true will cause the tag to report any method invocation errors in-line in the rendered page.
methodYesNoNo
Name of the method in the page flow that will be invoked.
resultIdNoNoNo
The PageContext attribute name where the result, if non-null, is stored.

See Also:
MethodParameter, CallMethod, CallControl, 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}"/>

Code Sample

[BEA_HOME]/weblogic81/samples/workshop/SamplesApp/tagSamples/netui_databinding/callPageFlow/callPageFlow.jsp

Beadoc.see:
<netui-data:callPageFlow> Tag Sample
Beadoc.tagdescription:
This tag calls a method on the Controller file (= JPF file) in the same directory as the JSP page. If no Controller file is found, an ObjectNotFoundException is thrown and the tag execution fails. Any return value is stored in the {pageContext...} data binding context object under the attribute specified by the resultId attribute.

For example, if you call the hello method with the following <netui-data:callPageFlow> tag...

    <netui-data:callPageFlow
          method="hello" 
          resultId="helloMessage" 
          />

...the result of the call is stored in the {pageContext...} data binding context under the attribute helloMessage.

The result can be retrieved with the data binding expression {pageContext.helloMessage}

   <netui:label value="{pageContext.helloMessage}"/>
In a scriptlet, the result can be retrieved by calling the getAttribute() method on the javax.servlet.jsp.PageContext object:
    <%= pageContext.getAttribute("helloMessage") %>

Note that only synchronous methods can be called with <netui-data:callPageFlow>. For handling asynchronous methods see the help topic Calling Web Services and Custom Java Controls From A Page Flow


Nested Class Summary
 
Nested classes/interfaces inherited from class com.bea.wlw.netui.tags.databinding.invoke.AbstractCallMethod
AbstractCallMethod.ParamNode
 
Field Summary
 
Fields inherited from class com.bea.wlw.netui.tags.AbstractBaseTag
ATTR_GENERAL, ATTR_GENERAL_EXPRESSION, ATTR_JAVASCRIPT, ATTR_STYLE, JAVASCRIPT_STATUS, NETUI_UNIQUE_CNT
 
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 com.bea.wlw.netui.tags.html.HtmlConstants
ACCEPT, ACCESSKEY, ACTION, ALIGN, ALINK, ALT, ANCHOR, BACKGROUND, BASE, BGCOLOR, BODY, BORDER, BR, CAPTION, CELLPADDING, CELLSPACING, CHAR, CHAROFF, CHARSET, CHECKED, CLASS, COLS, COORDS, DIR, DISABLED, DIV, ENCTYPE, FOR, FORM, FORM_GET, FORM_POST, FRAME, HEIGHT, HREF, HREFLANG, HSPACE, HTML, ID, IMAGE, INPUT, INPUT_BUTTON, INPUT_CHECKBOX, INPUT_FILE, INPUT_HIDDEN, INPUT_IMAGE, INPUT_PASSWORD, INPUT_RADIO, INPUT_RESET, INPUT_SUBMIT, INPUT_TEXT, ISMAP, LABEL, LANG, LINK, LONGDESC, MAXLENGTH, METHOD, NAME, ONBLUR, ONCHANGE, ONCLICK, ONDBLCLICK, ONFOCUS, ONKEYDOWN, ONKEYPRESS, ONKEYUP, ONLOAD, ONMOUSEDOWN, ONMOUSEMOVE, ONMOUSEOUT, ONMOUSEOVER, ONMOUSEUP, ONRESET, ONSELECT, ONSUBMIT, ONUNLOAD, OPTION, READONLY, REL, REV, ROWS, RULES, SELECT, SHAPE, SIZE, SPAN, SRC, STYLE, SUMMARY, TABINDEX, TABLE, TARGET, TD, TEXT, TEXTAREA, TITLE, TR, TYPE, USEMAP, VALIGN, VALUE, VLINK, VSPACE, WIDTH
 
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
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 com.bea.wlw.netui.tags.databinding.invoke.CallMethod
findMethod, getObject, localRelease, setObject
 
Methods inherited from class com.bea.wlw.netui.tags.databinding.invoke.AbstractCallMethod
addParameter, doEndTag, doStartTag, getFailOnError, getMethod, getParameterNodes, getResultId, handleReturnValue, setFailOnError, setMethod, setResultId
 
Methods inherited from class com.bea.wlw.netui.tags.AbstractBaseTag
addTagIdMapping, containsExpression, evaluateAttributeToString, evaluateExpression, filter, filter, formatErrorString, formatString, getAttribute, getErrorsReport, getExpressionEvaluator, getJavaScriptUtils, getNearestForm, getNextId, getQualifiedBundleName, getScriptReporter, getUserLocale, hasErrors, isExpression, prepForRendering, registerAttribute, registerError, registerTagError, release, removeAttribute, renderAttribute, renderAttributes, reportErrors, rewriteName, setPageContext, updateExpression, write
 
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doAfterBody, doInitBody, getBodyContent, getPreviousOut, setBodyContent
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, 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, 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.

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(HttpServletRequest) method.

Overrides:
resolveObject in class CallMethod
Returns:
the current PageFlow. If there is no current PageFlow, the ObjectNotFoundException will be thrown.
Throws:
@inheritDoc
ObjectNotFoundException - if an exception occurred attempting to resolve an object

BEA NetUI tags and APIs are included for backward compatibility only. For new applications, use the Beehive tags and APIs.