In a JavaScript client, you tell the server to perform
an action using the performAction
method
of the IlvView
JavaScript™
component.
Here is an example that asks the server side to execute
the action “delete” with coordinate parameters, assuming
that view
is an IlvView
:
var x = 100;
var y = 50;
var params = new Array();
params[0]=x;
params[1]=y;
view.performAction(“delete”, params);
In a thin-Java client the system is the same:
float x = 100f;
float y = 50f;
String[] params = new String[2];
params[0] = Float.toString(x);
params[1] = Float.toString(y);
view.performAction(“delete”, params);
The performAction
method
ask the server for a new image. In the image request, additional parameters
are added so that the server side can execute the action. Thus, the performAction
call
results in only one client/server round-trip.
Note that predefined interactors are provided to help
you define new actions on the client side. They are explained in
Predefined interactors.