Child pages
  • JSClient

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
{hidden}
DO NOT EDIT THE CONTENT OF THIS PAGE DIRECTLY, UNLESS YOU KNOW WHAT YOU'RE DOING.
		THE STRUCTURE OF THE CONTENT IS VITAL IN BEING ABLE TO EXTRACT CHANGES FROM THE PAGE AND MERGE THEM BACK INTO SERVOY SOURCE{hidden}
{sub-section:description|text=}{sub-section}\\ 

{table:id=|class=servoy sSummary}{colgroup}{column:padding=0px|width=80px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Constants Summary{th}{tr}{tbody}{tr}{td}[String]{td}{td}[#CALLBACK_EVENT]
Constant that is returned as a JSEvent type when in the callback method when it executed normally.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#CALLBACK_EXCEPTION_EVENT]
Constant that is returned as a JSEvent type when in the callback method when an exception occured.{td}{tr}{tbody}{table}\\ 

{table:id=|class=servoy sSummary}{colgroup}{column:padding=0px|width=80px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Method Summary{th}{tr}{tbody}{tr}{td}[String]{td}{td}[#getClientID]\()
gets the id of the client{td}{tr}{tbody}{tbody}{tr}{td}[Object]{td}{td}[#getDataProviderValue]\(contextcontextName, variableName, \[currentMethodName\]dataprovider)
getGet a dataproviderdata\-provider value from the client.{td}{tr}{tbody}{tbody}{tr}{td}[BooleanObject]{td}{td}[#isValid#getDataProviderValue]\()
contextName, dataprovider, methodName)
Get a data\-provider value.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#isValid]\()
returns true if this client is still valid/usable.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#queueMethod]\(contextcontextName, methodName, args, callbackFunctionnotifyCallBackMethod)
queueQueues a method call 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 remote server.{td}{tr}{tbody}{tbody}{tr}{td}[Object]{td}{td}[#setDataProviderValue]\(contextName, dataprovider, value)
Set a data\-provider value.{td}{tr}{tbody}{tbody}{tr}{td}[Object]{td}{td}[#setDataProviderValue]\(contextcontextName, variableNamedataprovider, value, \[currentMethodName\]methodName)
setSet a dataproviderdata\-provider value on the client.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#shutdown]\(force)
shutdown{
closes the client.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#shutdown]\(force)
closes the client.{td}{tr}{tbody}{table}\\ 

{table:id=constant|class=servoy sDetail}{colgroup}{column:padding=0px|width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Constants Details{th}{tr}{tbody:id=CALLBACK_EVENT|class=node}{tr:id=name}{td}h6.CALLBACK_EVENT{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:CALLBACK_EVENT_des|text=|trigger=button}{sub-section}{sub-section:CALLBACK_EVENT_des|trigger=none|class=sIndent}Replace with descriptionConstant that is returned as a JSEvent type when in the callback method when it executed normally.{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:CALLBACK_EVENT_snc|text=|trigger=button}{sub-section}{sub-section:CALLBACK_EVENT_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:CALLBACK_EVENT_prs|text=|trigger=button}{sub-section}{sub-section:CALLBACK_EVENT_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:CALLBACK_EVENT_ret|text=|trigger=button}{sub-section}{sub-section:CALLBACK_EVENT_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:CALLBACK_EVENT_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:CALLBACK_EVENT_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:CALLBACK_EVENT_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:CALLBACK_EVENT_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=sam}{td}*Sample*\\{sub-section:CALLBACK_EVENT_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:CALLBACK_EVENT_sam|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=CALLBACK_EXCEPTION_EVENT|class=node}{tr:id=name}{td}h6code:language=javascript}
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{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:CALLBACK_EXCEPTION_EVENT_des|text=|trigger=button}{sub-section}{sub-section:CALLBACK_EXCEPTION_EVENT_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\)
	{
		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);
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=CALLBACK_EXCEPTION_EVENT|class=node}{tr:id=name}{td}h6.CALLBACK_EXCEPTION_EVENT{td}{tr}{tr:id=des}{td}{sub-section:CALLBACK_EXCEPTION_EVENT_sncdes|text=|trigger=button}{sub-section}{sub-section:CALLBACK_EXCEPTION_EVENT_sncdes|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-showConstant that is returned as a JSEvent type when in the callback method when an exception occured.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prssnc}{td}*ParametersSince*\\{sub-section:CALLBACK_EXCEPTION_EVENT_prssnc|text=|trigger=button}{sub-section}{sub-section:CALLBACK_EXCEPTION_EVENT_prssnc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=retprs}{td}*ReturnsParameters*\\{sub-section:CALLBACK_EXCEPTION_EVENT_retprs|text=|trigger=button}{sub-section}{sub-section:CALLBACK_EXCEPTION_EVENT_retprs|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=seeret}{td}*Also seeReturns*\\{sub-section:CALLBACK_EXCEPTION_EVENT_seeret|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:CALLBACK_EXCEPTION_EVENT_seeret|trigger=none|class=sIndent}[String]{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=linksee}{td}*ExternalAlso linkssee*\\{sub-section:CALLBACK_EXCEPTION_EVENT_linksee|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:CALLBACK_EXCEPTION_EVENT_linksee|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=samlink}{td}*SampleExternal links*\\{sub-section:CALLBACK_EXCEPTION_EVENT_samlink|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:CALLBACK_EXCEPTION_EVENT_samlink|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:classid=lastDetailRowsam}{td}{td}{tr}{tbody}{table}\\ 

{table:id=function|class=servoy sDetail}{colgroup}{column:padding=0px|width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Method Details{th}{tr}{tbody:id=getClientID|class=node}{tr:id=name}{td}h6.getClientID{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}getClientID{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:getClientID_des|text=|trigger=button}{sub-section}{sub-section:getClientID_des|trigger=none|class=sIndent}gets the id of the client{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getClientID_snc|text=|trigger=button}{sub-section}{sub-section:getClientID_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:getClientID_prs|text=|trigger=button}{sub-section}{sub-section:getClientID_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getClientID_ret|text=|trigger=button}{sub-section}{sub-section:getClientID_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getClientID_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getClientID_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getClientID_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getClientID_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getClientID_sam*Sample*\\{sub-section:CALLBACK_EXCEPTION_EVENT_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:CALLBACK_EXCEPTION_EVENT_sam|trigger=none}{code:language=javascript}
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);
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}\\ 

{table:id=function|class=servoy sDetail}{colgroup}{column:padding=0px|width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Method Details{th}{tr}{tbody:id=getClientID|class=node}{tr:id=name}{td}h6.getClientID{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}getClientID{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:getClientID_des|text=|trigger=button}{sub-section}{sub-section:getClientID_des|trigger=none|class=sIndent}gets the id of the client{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getClientID_snc|text=|trigger=button}{sub-section}{sub-section:getClientID_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:getClientID_prs|text=|trigger=button}{sub-section}{sub-section:getClientID_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getClientID_ret|text=|trigger=button}{sub-section}{sub-section:getClientID_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getClientID_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getClientID_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getClientID_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getClientID_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getClientID_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getClientID_sam|trigger=none}{code:language=javascript}
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);
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getDataProviderValue-String_String|class=node}{tr:id=name}{td}h6.getDataProviderValue{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Object]{span}{span:id=iets|style=float: left; font-weight: bold;}getDataProviderValue{span}{span:id=iets|style=float: left;}\(contextName, dataprovider){span}{td}{tr}{tr:id=des}{td}{sub-section:getDataProviderValue-String_String_des|text=|trigger=button}{sub-section}{sub-section:getDataProviderValue-String_String_des|trigger=none|class=sIndent}Get a data\-provider value.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getDataProviderValue-String_String_snc|text=|trigger=button}{sub-section}{sub-section:getDataProviderValue-String_String_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getDataProviderValue-String_String_prs|text=|trigger=button}{sub-section}{sub-section:getDataProviderValue-String_String_prs|trigger=none|class=sIndent}\{[String]} contextName -- The context of the given method, null if it is global method or a form name for a form method
\{[String]} dataprovider -- the data\-provider name as seen in Servoy
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getDataProviderValue-String_String_ret|text=|trigger=button}{sub-section}{sub-section:getDataProviderValue-String_String_ret|trigger=none|class=sIndent}[Object] -- the value for the data-provider.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getDataProviderValue-String_String_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getDataProviderValue-String_String_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getDataProviderValue-String_String_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getDataProviderValue-String_String_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getDataProviderValue-String_String_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getDataProviderValue-String_String_sam|trigger=none}{code:language=javascript}
if (jsclient && jsclient.isValid())
{
	// only gets the globals.media when the 'remoteMethod' is currently executing for this client
	var value = jsclient.getDataProviderValue(null, "scopes.globals.number", 'remoteMethod');
	if (value != null)
	{
		application.output("value get from scopes.globals.number :: "+ value);
		scopes.globals.value = value+10;
		var returnValue = jsclient.setDataProviderValue(null, "scopes.globals.number", scopes.globals.value, 'remoteMethod');
		application.output("value set to scopes.globals.number previous value "+ returnValue);
	}
	else
	{
		application.output("value get from scopes.globals.number :: " + null);
	}
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getDataProviderValue-String_String_String|class=node}{tr:id=name}{td}h6.getDataProviderValue{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Object]{span}{span:id=iets|style=float: left; font-weight: bold;}getDataProviderValue{span}{span:id=iets|style=float: left;}\(contextName, dataprovider, methodName){span}{td}{tr}{tr:id=des}{td}{sub-section:getDataProviderValue-String_String_String_des|text=|trigger=button}{sub-section}{sub-section:getDataProviderValue-String_String_String_des|trigger=none|class=sIndent}Get a data\-provider value.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getDataProviderValue-String_String_String_snc|text=|trigger=button}{sub-section}{sub-section:getDataProviderValue-String_String_String_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getDataProviderValue-String_String_String_prs|text=|trigger=button}{sub-section}{sub-section:getDataProviderValue-String_String_String_prs|trigger=none|class=sIndent}\{[String]} contextName -- The context of the given method; null if it is global method or a form name for a form method.
\{[String]} dataprovider -- the data\-provider name as seen in Servoy.
\{[String]} methodName -- if this is specified, the data\-provider's value will only be returned if the specified method is running in this headless client because the currently running client requested it to. Otherwise undefined is returned.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getDataProviderValue-String_String_String_ret|text=|trigger=button}{sub-section}{sub-section:getDataProviderValue-String_String_String_ret|trigger=none|class=sIndent}[Object] -- the value of the data-provider.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getDataProviderValue-String_String_String_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getDataProviderValue-String_String_String_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getDataProviderValue-String_String_String_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getDataProviderValue-String_String_String_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getDataProviderValue-String_String_String_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getDataProviderValue-String_String_String_sam|trigger=none}{code:language=javascript}
if (jsclient && jsclient.isValid())
{
	// only gets the globals.media when the 'remoteMethod' is currently executing for this client
	var value = jsclient.getDataProviderValue(null, "scopes.globals.number", 'remoteMethod');
	if (value != null)
	{
		application.output("value get from scopes.globals.number :: "+ value);
		scopes.globals.value = value+10;
		var returnValue = jsclient.setDataProviderValue(null, "scopes.globals.number", scopes.globals.value, 'remoteMethod');
		application.output("value set to scopes.globals.number previous value "+ returnValue);
	}
	else
	{
		application.output("value get from scopes.globals.number :: " + null);
	}
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=isValid|class=node}{tr:id=name}{td}h6.isValid{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}isValid{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:isValid_des|text=|trigger=button}{sub-section}{sub-section:isValid_des|trigger=none|class=sIndent}returns true if this client is still valid/usable.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:isValid_snc|text=|trigger=button}{sub-section}{sub-section:isValid_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:isValid_prs|text=|trigger=button}{sub-section}{sub-section:isValid_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:isValid_ret|text=|trigger=button}{sub-section}{sub-section:isValid_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:isValid_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:isValid_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:isValid_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:isValid_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:isValid_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:isValid_sam|trigger=none}{code:language=javascript}
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);
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=queueMethod|class=node}{tr:id=name}{td}h6.queueMethod{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}queueMethod{span}{span:id=iets|style=float: left;}\(contextName, methodName, args, notifyCallBackMethod){span}{td}{tr}{tr:id=des}{td}{sub-section:queueMethod_des|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getClientIDqueueMethod_samdes|trigger=none}{code:language=javascript}
if (jsclient && jsclient.isValid())
{
	/*Queue |class=sIndent}Queues a method call whereon the callbackremote canserver. doThe somethingcallback likemethod thiswill 	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);
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getDataProviderValue|class=node}{tr:id=name}{td}h6.getDataProviderValue{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Object]{span}{span:id=iets|style=float: left; font-weight: bold;}getDataProviderValue{span}{span:id=iets|style=float: left;}\(context, variableName, \[currentMethodName\]){span}{td}{tr}{tr:id=des}{td}{sub-section:getDataProviderValue_desbe called when the method is executed on the server
and the return value is given as the JSEvent.data object with the JSEvent.getType() value of JSClient.CALLBACK\_EVENT. 
If an exception is thrown somewhere then the callback method will be called with
the exception as the JSEvent data object with the JSEvent.getType() value of JSClient.CALLBACK\_EXCEPTION\_EVENT
The second argument that is give back is the JSClient instance that did the call.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:queueMethod_snc|text=|trigger=button}{sub-section}{sub-section:queueMethod_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:queueMethod_prs|text=|trigger=button}{sub-section}{sub-section:getDataProviderValuequeueMethod_desprs|trigger=none|class=sIndent}get a dataprovider value from the client{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getDataProviderValue_snc|text=|trigger=button}{sub-section}{sub-section:getDataProviderValue_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getDataProviderValue_prs|text=|trigger=button}{sub-section}{sub-section:getDataProviderValue_prs|trigger=none|class=sIndent}context
variableName
\[currentMethodName\]=sIndent}\{[String]} contextName -- The context of the given method, null if it is global method or a form name for a form method.
\{[String]} methodName -- The method name.
\{[Object]\[]} args -- The arguments that should be passed to the method.
\{[Function]} notifyCallBackMethod -- The callback method that is called when the execution is finished.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getDataProviderValuequeueMethod_ret|text=|trigger=button}{sub-section}{sub-section:getDataProviderValuequeueMethod_ret|trigger=none|class=sIndent}[Object]void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getDataProviderValuequeueMethod_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getDataProviderValuequeueMethod_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getDataProviderValuequeueMethod_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getDataProviderValuequeueMethod_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getDataProviderValuequeueMethod_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getDataProviderValuequeueMethod_sam|trigger=none}{code:language=javascript}
if (jsclient && jsclient.isValid())
{
	//*Queue onlya gets the globals.media whenmethod where the 'remoteMethod'callback iscan currentlydo executingsomething forlike this
client
	var value = jsclient.getDataProviderValue(null, "globals.number", 'remoteMethod');
	if (value != nullif (event.getType() == JSClient.CALLBACK_EVENT)
	{
		application.output("callback data, name: " + event.data);
	}
	else if (event.getType() == JSClient.CALLBACK_EXCEPTION_EVENT)
	{
		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);
	}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);
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=isValidsetDataProviderValue-String_String_Object|class=node}{tr:id=name}{td}h6.isValidsetDataProviderValue{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[BooleanObject]{span}{span:id=iets|style=float: left; font-weight: bold;}isValid{span}{span:id=iets|style=float: left;}\(){spansetDataProviderValue{span}{span:id=iets|style=float: left;}\(contextName, dataprovider, value){span}{td}{tr}{tr:id=des}{td}{sub-section:setDataProviderValue-String_String_Object_des|text=|trigger=button}{sub-section}{sub-section:setDataProviderValue-String_String_Object_des|trigger=none|class=sIndent}Set a data\-provider value.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=dessnc}{td}*Since*\\{sub-section:isValid_dessetDataProviderValue-String_String_Object_snc|text=|trigger=button}{sub-section}{sub-section:isValid_dessetDataProviderValue-String_String_Object_snc|trigger=none|class=sIndent}returns trueReplace ifwith this client is still valid/usableversion info{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=sncprs}{td}*SinceParameters*\\{sub-section:isValid_sncsetDataProviderValue-String_String_Object_prs|text=|trigger=button}{sub-section}{sub-section:isValid_sncsetDataProviderValue-String_String_Object_prs|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:isValid_prs|text=|trigger=button}{sub-section}{sub-section:isValid_prs|trigger=none|class=sIndent}}\{[String]} contextName -- The context of the given method, null if it is global method or a form name for a form method.
\{[String]} dataprovider -- the data\-provider name as seen in Servoy.
\{[Object]} value -- the value to set.
{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:isValidsetDataProviderValue-String_String_Object_ret|text=|trigger=button}{sub-section}{sub-section:isValidsetDataProviderValue-String_String_Object_ret|trigger=none|class=sIndent}[Boolean]Object] -- the old value or null if no change.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:isValidsetDataProviderValue-String_String_Object_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:isValidsetDataProviderValue-String_String_Object_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:isValidsetDataProviderValue-String_String_Object_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:isValidsetDataProviderValue-String_String_Object_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:isValidsetDataProviderValue-String_String_Object_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:isValidsetDataProviderValue-String_String_Object_sam|trigger=none}{code:language=javascript}
if (jsclient && jsclient.isValid())
{
	/*Queue/ aonly method wheregets the callbackglobals.media canwhen dothe something'remoteMethod' likeis thiscurrently 	if (event.getType() == JSClient.CALLBACK_EVENT)
	{
		application.output("callback data, name: " + event.data);
	}
	else if (event.getType() == JSClient.CALLBACK_EXCEPTION_EVENTexecuting for this client
	var value = jsclient.getDataProviderValue(null, "scopes.globals.number", 'remoteMethod');
	if (value != null)
	{
		application.output("exception callback, namevalue get from scopes.globals.number :: "+ + event.data)value);
		scopes.globals.value = value+10;
	}*/
	var xreturnValue = 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);
}
{code}{sub-section}{divjsclient.setDataProviderValue(null, "scopes.globals.number", scopes.globals.value, 'remoteMethod');
		application.output("value set to scopes.globals.number previous value "+ returnValue);
	}
	else
	{
		application.output("value get from scopes.globals.number :: " + null);
	}
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=setDataProviderValue-String_String_Object_String|class=node}{tr:id=name}{td}h6.setDataProviderValue{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Object]{span}{span:id=iets|style=float: left; font-weight: bold;}setDataProviderValue{span}{span:id=iets|style=float: left;}\(contextName, dataprovider, value, methodName){span}{td}{tr}{tr:classid=lastDetailRowdes}{td}{td}{tr}{tbody}{tbody:id=queueMethod|class=node}{tr:id=name}{td}h6.queueMethod{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}queueMethod{span}{span:id=iets|style=float: left;}\(context, methodName, args, callbackFunction){spansub-section:setDataProviderValue-String_String_Object_String_des|text=|trigger=button}{sub-section}{sub-section:setDataProviderValue-String_String_Object_String_des|trigger=none|class=sIndent}Set a data\-provider value.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:setDataProviderValue-String_String_Object_String_snc|text=|trigger=button}{sub-section}{sub-section:setDataProviderValue-String_String_Object_String_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=desprs}{td}*Parameters*\\{sub-section:queueMethod_dessetDataProviderValue-String_String_Object_String_prs|text=|trigger=button}{sub-section}{sub-section:queueMethod_dessetDataProviderValue-String_String_Object_String_prs|trigger=none|class=sIndent}queuesIndent}\{[String]} contextName -- The context of the given method, null if it is global method or a form name for a form 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{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:queueMethod_snc|text=|trigger=button}{sub-section}{sub-section:queueMethod_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:queueMethod_prs|text=|trigger=button}{sub-section}{sub-section:queueMethod_prs|trigger=none|class=sIndent}context
methodName
args
callbackFunction
\{[String]} dataprovider -- the data\-provider name as seen in Servoy
\{[Object]} value -- the value to set
\{[String]} methodName -- if this is specified, the data\-provider's value will only be set if the specified method is running in this headless client because the currently running client requested it to. Otherwise the value is not set into the data\-provider and undefined is returned.
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:queueMethodsetDataProviderValue-String_String_Object_String_ret|text=|trigger=button}{sub-section}{sub-section:queueMethodsetDataProviderValue-String_String_Object_String_ret|trigger=none|class=sIndent}void[Object] -- the old value or null if no change{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:queueMethodsetDataProviderValue-String_String_Object_String_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:queueMethodsetDataProviderValue-String_String_Object_String_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:queueMethodsetDataProviderValue-String_String_Object_String_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:queueMethodsetDataProviderValue-String_String_Object_String_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:queueMethodsetDataProviderValue-String_String_Object_String_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:queueMethodsetDataProviderValue-String_String_Object_String_sam|trigger=none}{code:language=javascript}
if (jsclient && jsclient.isValid())
{
	/*Queue a method where/ only gets the globals.media when the callback'remoteMethod' canis docurrently somethingexecuting likefor this client
	if (event.getType()var value == JSClient.CALLBACK_EVENT)
	{
		application.output("callback data, name: " + event.data);
	}
	else if (event.getType() == JSClient.CALLBACK_EXCEPTION_EVENTjsclient.getDataProviderValue(null, "scopes.globals.number", 'remoteMethod');
	if (value != null)
	{
		application.output("exception callback, namevalue get from scopes.globals.number :: " + event.datavalue);
	}*/
	var x	scopes.globals.value = new Object()value+10;
	x.name	var returnValue = 'remote1';
	x.number = 10;
	// this calls ajsclient.setDataProviderValue(null, "scopes.globals.number", scopes.globals.value, 'remoteMethod' on the server as a global method, because the context (first argument is );
		application.output("value set to null), you can use a formname to call a form method
	jsclient.queueMethod(null, "remoteMethod", [x], callback);scopes.globals.number previous value "+ returnValue);
	}
	else
	{
		application.output("value get from scopes.globals.number :: " + null);
	}
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=setDataProviderValueshutdown|class=node}{tr:id=name}{td}h6.setDataProviderValueshutdown{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Object]void{span}{span:id=iets|style=float: left; font-weight: bold;}setDataProviderValueshutdown{span}{span:id=iets|style=float: left;}\(context, variableName, value, \[currentMethodName\];}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:setDataProviderValueshutdown_des|text=|trigger=button}{sub-section}{sub-section:setDataProviderValueshutdown_des|trigger=none|class=sIndent}set a dataprovider value on closes the client.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:setDataProviderValueshutdown_snc|text=|trigger=button}{sub-section}{sub-section:setDataProviderValueshutdown_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:setDataProviderValueshutdown_prs|text=|trigger=button}{sub-section}{sub-section:setDataProviderValueshutdown_prs|trigger=none|class=sIndent}context
variableName
value
\[currentMethodName\]
{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:setDataProviderValueshutdown_ret|text=|trigger=button}{sub-section}{sub-section:setDataProviderValueshutdown_ret|trigger=none|class=sIndent}[Object]void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:setDataProviderValueshutdown_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setDataProviderValueshutdown_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:setDataProviderValueshutdown_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setDataProviderValueshutdown_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:setDataProviderValueshutdown_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setDataProviderValueshutdown_sam|trigger=none}{code:language=javascript}
if (jsclient && jsclient.isValid())
{
	//*Queue onlya gets the globals.media when the 'remoteMethod' is currently executing for this client
	var value = jsclient.getDataProviderValue(null, "globals.number", 'remoteMethod');
	if (value != nullmethod 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("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);
	}
}
"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);
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=shutdown-Boolean|class=node}{tr:id=name}{td}h6.shutdown{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}shutdown{span}{span:id=iets|style=float: left;}\(force){span}{td}{tr}{tr:id=des}{td}{sub-section:shutdown-Boolean_des|text=|trigger=button}{sub-section}{sub-section:shutdown-Boolean_des|trigger=none|class=sIndent}shutdowncloses the client.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:shutdown-Boolean_snc|text=|trigger=button}{sub-section}{sub-section:shutdown-Boolean_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:shutdown-Boolean_prs|text=|trigger=button}{sub-section}{sub-section:shutdown-Boolean_prs|trigger=none|class=sIndent}\{[Boolean]} force
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:shutdown-Boolean_ret|text=|trigger=button}{sub-section}{sub-section:shutdown-Boolean_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:shutdown-Boolean_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:shutdown-Boolean_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:shutdown-Boolean_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:shutdown-Boolean_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:shutdown-Boolean_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:shutdown-Boolean_sam|trigger=none}{code:language=javascript}
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);
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}