Table Row (tr) |
---|
| Table Head (th) |
---|
| Method Details |
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
getClientID |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
style | float: left; margin-right: 5px; |
---|
| String |
Span |
---|
style | float: left; font-weight: bold; |
---|
id | iets |
---|
| getClientID |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
gets the id of the client |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
if (jsclient && jsclient.isValid())
{
/*Queue a method where the callback can do something like this
if (event.getType() == JSClient.CALLBACK_EVENT)
{
application.output("callback data, name: " + event.data);
}
else if (event.getType() == JSClient.CALLBACK_EXCEPTION_EVENT)
{
application.output("exception callback, name: " + event.data);
}*/
var x = new Object();
x.name = 'remote1';
x.number = 10;
// this calls a 'remoteMethod' on the server as a global method, because the context (first argument is set to null), you can use a formname to call a form method
jsclient.queueMethod(null, "remoteMethod", [x], callback);
}
|
|
|
|
|
Table Body (tbody) |
---|
id | getDataProviderValue |
---|
class | node |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
getDataProviderValue |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
style | float: left; margin-right: 5px; |
---|
| Object |
Span |
---|
style | float: left; font-weight: bold; |
---|
id | iets |
---|
| getDataProviderValue |
Span |
---|
| (context, variableName, [currentMethodName]) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
get a dataprovider value from the client |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters context variableName [currentMethodName] |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
if (jsclient && jsclient.isValid())
{
// only gets the globals.media when the 'remoteMethod' is currently executing for this client
var value = jsclient.getDataProviderValue(null, "globals.number", 'remoteMethod');
if (value != null)
{
application.output("value get from globals.number :: "+ value);
globals.value = value+10;
var returnValue = jsclient.setDataProviderValue(null, "globals.number", globals.value, 'remoteMethod');
application.output("value set to globals.number previous value "+ returnValue);
}
else
{
application.output("value get from globals.number :: " + null);
}
}
|
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
style | float: left; margin-right: 5px; |
---|
| Boolean |
Span |
---|
style | float: left; font-weight: bold; |
---|
id | iets |
---|
| isValid |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
returns true if this client is still valid/usable |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
if (jsclient && jsclient.isValid())
{
/*Queue a method where the callback can do something like this
if (event.getType() == JSClient.CALLBACK_EVENT)
{
application.output("callback data, name: " + event.data);
}
else if (event.getType() == JSClient.CALLBACK_EXCEPTION_EVENT)
{
application.output("exception callback, name: " + event.data);
}*/
var x = new Object();
x.name = 'remote1';
x.number = 10;
// this calls a 'remoteMethod' on the server as a global method, because the context (first argument is set to null), you can use a formname to call a form method
jsclient.queueMethod(null, "remoteMethod", [x], callback);
}
|
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
queueMethod |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
style | float: left; margin-right: 5px; |
---|
| void |
Span |
---|
style | float: left; font-weight: bold; |
---|
id | iets |
---|
| queueMethod |
Span |
---|
| (context, methodName, args, callbackFunction) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
queue a method on the client, calling the method name specified on the context, the callback method will get a JSEvent as the first and a JSClient (the this of the client that did the call) as the second parameter |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters context methodName args callbackFunction |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns void |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
if (jsclient && jsclient.isValid())
{
/*Queue a method where the callback can do something like this
if (event.getType() == JSClient.CALLBACK_EVENT)
{
application.output("callback data, name: " + event.data);
}
else if (event.getType() == JSClient.CALLBACK_EXCEPTION_EVENT)
{
application.output("exception callback, name: " + event.data);
}*/
var x = new Object();
x.name = 'remote1';
x.number = 10;
// this calls a 'remoteMethod' on the server as a global method, because the context (first argument is set to null), you can use a formname to call a form method
jsclient.queueMethod(null, "remoteMethod", [x], callback);
}
|
|
|
|
|
Table Body (tbody) |
---|
id | setDataProviderValue |
---|
class | node |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
setDataProviderValue |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
style | float: left; margin-right: 5px; |
---|
| Object |
Span |
---|
style | float: left; font-weight: bold; |
---|
id | iets |
---|
| setDataProviderValue |
Span |
---|
| (context, variableName, value, [currentMethodName]) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
set a dataprovider value on the client |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters context variableName value [currentMethodName] |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
if (jsclient && jsclient.isValid())
{
// only gets the globals.media when the 'remoteMethod' is currently executing for this client
var value = jsclient.getDataProviderValue(null, "globals.number", 'remoteMethod');
if (value != null)
{
application.output("value get from globals.number :: "+ value);
globals.value = value+10;
var returnValue = jsclient.setDataProviderValue(null, "globals.number", globals.value, 'remoteMethod');
application.output("value set to globals.number previous value "+ returnValue);
}
else
{
application.output("value get from globals.number :: " + null);
}
}
|
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
style | float: left; margin-right: 5px; |
---|
| void |
Span |
---|
style | float: left; font-weight: bold; |
---|
id | iets |
---|
| shutdown |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters force |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns void |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
if (jsclient && jsclient.isValid())
{
/*Queue a method where the callback can do something like this
if (event.getType() == JSClient.CALLBACK_EVENT)
{
application.output("callback data, name: " + event.data);
}
else if (event.getType() == JSClient.CALLBACK_EXCEPTION_EVENT)
{
application.output("exception callback, name: " + event.data);
}*/
var x = new Object();
x.name = 'remote1';
x.number = 10;
// this calls a 'remoteMethod' on the server as a global method, because the context (first argument is set to null), you can use a formname to call a form method
jsclient.queueMethod(null, "remoteMethod", [x], callback);
}
|
|
|
|
|
|