org.zkoss.zk.au.out
Class AuInvoke

java.lang.Object
  extended by org.zkoss.zk.au.AuResponse
      extended by org.zkoss.zk.au.out.AuInvoke

public class AuInvoke
extends AuResponse

A response to ask the client to execute the specified client function. Unlike AuScript, it invokes the function called zkType.function, where Type is the component's type (at the client) and function is the function name specified in AuInvoke.

data[0]: the component UUID
data[1]: the client function name (i.e., JavaScript function)
data[2]: the second argument
data[3]: the third argument...

Note: the first argument is always the component itself.

Since:
3.0.0
Author:
tomyeh

Field Summary
 
Fields inherited from class org.zkoss.zk.au.AuResponse
_cmd, _data
 
Constructor Summary
AuInvoke(Component comp, java.lang.String function)
          Construct AuInvoke to call the peer widget's member function with no argument.
AuInvoke(Component comp, java.lang.String function, boolean arg)
          Construct AuInvoke to call the peer widget's member function with one boolean argument.
AuInvoke(Component comp, java.lang.String function, double arg)
          Construct AuInvoke to call the peer widget's member function with one double argument.
AuInvoke(Component comp, java.lang.String function, int arg)
          Construct AuInvoke to call the peer widget's member function with one int argument.
AuInvoke(Component comp, java.lang.String function, java.lang.Object arg)
          Construct AuInvoke to call the peer widget's member function with one argument.
AuInvoke(Component comp, java.lang.String function, java.lang.Object[] args)
          Construct AuInvoke to call the peer widget's member function with an array of arguments.
AuInvoke(Component comp, java.lang.String function, java.lang.Object arg1, java.lang.Object arg2)
          Construct AuInvoke to call the peer widget's member function with two arguments.
AuInvoke(Component comp, java.lang.String function, java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3)
          Construct AuInvoke to call the peer widget's member function with three arguments.
AuInvoke(Component comp, java.lang.String function, java.lang.String[] args)
          Construct AuInvoke to call a client function with variable number of arguments.
 
Method Summary
 
Methods inherited from class org.zkoss.zk.au.AuResponse
equals, getCommand, getDepends, getEncodedData, getRawData, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AuInvoke

public AuInvoke(Component comp,
                java.lang.String function)
Construct AuInvoke to call the peer widget's member function with no argument.

Parameters:
comp - the component that the widget is associated with. It cannot be null.
function - the function name

AuInvoke

public AuInvoke(Component comp,
                java.lang.String function,
                java.lang.Object arg)
Construct AuInvoke to call the peer widget's member function with one argument.

Parameters:
comp - the component that the widget is associated with. It cannot be null.
function - the function name
arg - the additional argument. It could be null, String, Date, DeferredValue, and any kind of objects that the client accepts (marshaled by JSON).
Since:
5.0.0

AuInvoke

public AuInvoke(Component comp,
                java.lang.String function,
                boolean arg)
Construct AuInvoke to call the peer widget's member function with one boolean argument.

Parameters:
comp - the component that the widget is associated with. It cannot be null.
function - the function name
arg - the additional argument. Different devices might support more types.
Since:
5.0.0

AuInvoke

public AuInvoke(Component comp,
                java.lang.String function,
                int arg)
Construct AuInvoke to call the peer widget's member function with one int argument.

Parameters:
comp - the component that the widget is associated with. It cannot be null.
function - the function name
arg - the additional argument.
Since:
5.0.0

AuInvoke

public AuInvoke(Component comp,
                java.lang.String function,
                double arg)
Construct AuInvoke to call the peer widget's member function with one double argument.

Parameters:
comp - the component that the widget is associated with. It cannot be null.
function - the function name
arg - the additional argument.
Since:
5.0.0

AuInvoke

public AuInvoke(Component comp,
                java.lang.String function,
                java.lang.Object arg1,
                java.lang.Object arg2)
Construct AuInvoke to call the peer widget's member function with two arguments.

Parameters:
comp - the component that the widget is associated with. It cannot be null.
function - the function name
arg1 - the additional argument. It could be null, String, Date, DeferredValue, and any kind of objects that the client accepts (marshaled by JSON).
arg2 - the 2nd additional argument.
Since:
5.0.0

AuInvoke

public AuInvoke(Component comp,
                java.lang.String function,
                java.lang.Object arg1,
                java.lang.Object arg2,
                java.lang.Object arg3)
Construct AuInvoke to call the peer widget's member function with three arguments.

Parameters:
comp - the component that the widget is associated with. It cannot be null.
function - the function name
arg1 - the additional argument. It could be null, String, Date, DeferredValue, and any kind of objects that the client accepts (marshaled by JSON).
arg2 - the 2nd additional argument.
arg3 - the 3rd additional argument.
Since:
5.0.0

AuInvoke

public AuInvoke(Component comp,
                java.lang.String function,
                java.lang.Object[] args)
Construct AuInvoke to call the peer widget's member function with an array of arguments.

Parameters:
comp - the component that the widget is associated with. It cannot be null.
function - the function name
args - the additional arguments. It could be null, String, Date, DeferredValue, and any kind of objects that the client accepts (marshaled by JSON since 5.0.0).
Since:
3.6.1

AuInvoke

public AuInvoke(Component comp,
                java.lang.String function,
                java.lang.String[] args)
Construct AuInvoke to call a client function with variable number of arguments. Notice that the component itself will be inserted in front of the specified argument array. In other words, the first argument is the component itself, the second is the first item in the argument array, and so on.
zkType.function(comp, args[0], args[1], args[2]...)

Parameters:
comp - the component that this script depends on. It cannot be null.
function - the function name
Since:
3.6.0


Copyright © 2005-2009 Potix Corporation. All Rights Reserved. SourceForge.net Logo