|
BEA NetUI tags and APIs are included for backward compatibility only. For new applications, use the Beehive tags and APIs. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.servlet.jsp.tagext.TagSupport javax.servlet.jsp.tagext.BodyTagSupport com.bea.wlw.netui.tags.AbstractBaseTag com.bea.wlw.netui.tags.databinding.invoke.AbstractCallMethod com.bea.wlw.netui.tags.databinding.invoke.CallControl
public class CallControl
A tag that is used to call a method on a control. The
control on which to invoke the method is taken from the PageContext
attribute map, and the given method is reflectively invoked using the parameters
provided in any nested MethodParameter
tags.
This tag extends the CallMethod
tag, which defines additional attributes.
The controlId
attribute is used to specify a Control in the
PageContext
attribute map; the method will
be invoked on this Control. Any return value will be 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 | |||
---|---|---|---|
Attribute | Required | Runtime Expression Evaluation | Data Bindable |
controlId | No | No | Yes |
A PageContext attribute name whose value is the control to call. | |||
failOnError | No | No | No |
A boolean that if true will cause the tag to report any method invocation errors in-line in the rendered page. | |||
method | No | No | No |
Name of the method in the control that will be invoked. | |||
resultId | No | No | No |
The PageContext attribute name where the result, if non-null, is stored. |
MethodParameter
,
CallMethod
,
CallPageFlow
,
Serialized FormDeclareControl
tag to declare
a control. Then the
<netui-data:callControl> tag calls the insertProduct
method on that control.
The insertProduct
method is called with parameters, provided by
MethodParameter
tags.
<netui-data:declareControl type="dbControls.ProductsDBControl" controlId="productsDBControl"/> <netui-data:callControl controlId="productsDBControl" method="insertProduct"> <netui-data:methodParameter value="1"/> <netui-data:methodParameter value='ACME RacePro Crankset'/> <netui-data:methodParameter value="280.00"/> <netui-data:methodParameter value="acme_racepro_crankset.jpg"/> <netui-data:methodParameter value="true"/> </netui-data:callControl>
[BEA_HOME]/weblogic81/samples/workshop/SamplesApp/tagSamples/netui_databinding/callControl/callControl.jsp
This tag is used to call a method on a control file (either a JCS or JCX file).
The controlId
attribute is used to specify the control file to be called.
The value returned by the method will be set in the
{pageContext...} data binding context under the attribute specified by
the resultId
attribute.
For example, if you call a control with the following <netui-data:callControl> tag...
<netui-data:callControl controlId="helloWorldControl" 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") %>
The <netui-data:callControl> tag must be used in conjunction with
the DeclareControl
tag.
The <netui-data:declareControl> tag is used to give the control a controlId
:
<netui-data:declareControl type="tagSamples.netui_databinding.callControl.HelloWorldControl" controlId="helloWorldControl" />
Then the <netui-data:callControl> refers to the control using that controlId
:
<netui-data:callControl controlId="helloWorldControl" method="hello" resultId="helloMessage" />
Note that only synchronous methods can be called with <netui:callControl>. 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 | |
---|---|
CallControl()
|
Method Summary | |
---|---|
String |
getControlId()
Get the String identifier of the Control that on which a method will be invoked. |
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 void |
localRelease()
Reset all of the fields of this tag. |
protected Object |
resolveObject()
Get the Control whose method to invoke. |
void |
setControlId(String controlId)
Set the String which identifies the Control on which a method will be invoked. |
Methods inherited from class com.bea.wlw.netui.tags.databinding.invoke.AbstractCallMethod |
---|
addParameter, doEndTag, doStartTag, findMethod, getFailOnError, getMethod, getParameterNodes, getResultId, handleReturnValue, setFailOnError, setMethod, setResultId |
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 |
---|
public CallControl()
Method Detail |
---|
public String getTagName()
getTagName
in class AbstractBaseTag
public void setControlId(String controlId)
controlId
- the String identifier that references the Controlpublic String getControlId()
protected void localRelease()
localRelease
in class AbstractCallMethod
protected String getObjectName()
getObjectName
in class AbstractCallMethod
protected Object resolveObject() throws ObjectNotFoundException
CallMethod.resolveObject()
method that looks for a Control in the
PageContext
attribute map of the current JSP page.
resolveObject
in class AbstractCallMethod
@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. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |