Name

remotecall

Synopsis

LZX: remotecall
JavaScript: remotecall
Type: Class
Access: public
Topic: Components.RPC
Declared in: lps/components/rpc/rpc.lzx

Description

A class to invoke rpc methods more declaratively.

Superclass Chain

node (LzNode) » remotecall

Known Subclasses

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}" />
public var name;
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" />
public event ondata;
This event is triggered when data is returned from a remote method.
onerror
<attribute name="onerror" />
public event 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=" inforeturnvalue " type="boolean" value="false" />
  <attribute name=" name " value="$once{null}" />
  <attribute name=" remotecontext " type="expression" value="null" />
  <method name=" invoke " args="params, delegate" />
  <event name=" ondata " />
  <event name=" onerror " />
</class>

JavaScript Synopsis

public remotecall extends  LzNode  {
  public var dataobject  : Object;
  public var funcname  : String;
  public var inforeturnvalue  : Boolean;
  public var name ;
  public var remotecontext  : Object;
  prototype public function invoke (params : Array, delegate : LzDelegate);
  prototype public event ondata ;
  prototype public event onerror ;
}