Description
A class to invoke rpc methods more declaratively.
Details
Properties (5)
-
dataobject
-
<attribute name="dataobject" type="expression" value="null" />
public var dataobject : Object;
If an LzDataset or an LzDataElement is set, return values will
be mapped into the dataobject.
-
funcname
-
<attribute name="funcname" type="string" value="$once{null}" />
public var funcname : String;
Name of remote function this remotecall refers.
-
inforeturnvalue
-
<attribute name="inforeturnvalue" type="boolean" value="false" />
public var inforeturnvalue : Boolean;
If true, a remote response returns an object. The object of a
successful response will contain the return value (data), an object
containing specific information about the request (info), and the
associated unique sequence request number (seqnum), e.g., { data:
..., info: ..., seqnu: ...}. A failure response returns an object
that contains the error message (message), the error type (error),
an object containing specific information about the request (info),
and the associated unique sequence request number (seqnum), e.g., {
message: ..., error: ..., info: ..., seqnum: ...}. If false, an
error just returns the error message and a successful response
returns a value. Default is false.
-
name
-
<attribute name="name" value="$once{null}" />
Name of remotecall. Default is value of funcname attribute.
-
remotecontext
-
<attribute name="remotecontext" type="expression" value="null" />
public var remotecontext : Object;
If set, this is the remote object context in which funcname is run
from.
Methods (1)
-
invoke()
-
<method name="invoke" args="params, delegate" />
public function invoke(params : Array, delegate : LzDelegate);
Call this method to invoke function with passed in parameters.
Events (2)
-
ondata
-
<attribute name="ondata" />
This event is triggered when data is returned from a remote
method.
-
onerror
-
<attribute name="onerror" />
This event is triggered when an error occurs.
LZX Synopsis
<class name="
remotecall" extends="
LzNode
">
<attribute name="
dataobject
" type="
expression" value="
null" />
<attribute name="
funcname
" type="
string" value="
$once{null}" />
<attribute name="
name
" value="
$once{null}" />
<attribute name="
remotecontext
" type="
expression" value="
null" />
<method name="
invoke
" args="
params,
delegate" />
</class>
JavaScript Synopsis
public
remotecall extends
LzNode
{
prototype public function
invoke
(
params : Array,
delegate : LzDelegate);
prototype public event
ondata
;
}