{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]\(contextName, dataprovider)
Get a data\-provider value.{td}{tr}{tbody}{tbody}{tr}{td}[Object]{td}{td}[#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]\(contextName, methodName, args, notifyCallBackMethod)
Queues a method call on the 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]\(contextName, dataprovider, value, methodName)
Set a data\-provider value.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#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}{tr:id=des}{td}{sub-section:CALLBACK_EVENT_des|text=|trigger=button}{sub-section}{sub-section:CALLBACK_EVENT_des|trigger=none|class=sIndent}Constant that is returned as a JSEvent type when in the callback method when it executed normally.{sub-section}{td}{tr}{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}{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}{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=CALLBACK_EXCEPTION_EVENT|class=node}{tr:id=name}{td}h6.CALLBACK_EXCEPTION_EVENT{td}{tr}{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}Constant 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=snc}{td}*Since*\\{sub-section:CALLBACK_EXCEPTION_EVENT_snc|text=|trigger=button}{sub-section}{sub-section:CALLBACK_EXCEPTION_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_EXCEPTION_EVENT_prs|text=|trigger=button}{sub-section}{sub-section:CALLBACK_EXCEPTION_EVENT_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:CALLBACK_EXCEPTION_EVENT_ret|text=|trigger=button}{sub-section}{sub-section:CALLBACK_EXCEPTION_EVENT_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:CALLBACK_EXCEPTION_EVENT_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:CALLBACK_EXCEPTION_EVENT_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:CALLBACK_EXCEPTION_EVENT_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:CALLBACK_EXCEPTION_EVENT_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*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}{sub-section:queueMethod_des|trigger=none|class=sIndent}Queues a method call on the remote server. The callback method will be 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:queueMethod_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]} 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:queueMethod_ret|text=|trigger=button}{sub-section}{sub-section:queueMethod_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:queueMethod_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:queueMethod_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:queueMethod_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:queueMethod_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:queueMethod_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:queueMethod_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=setDataProviderValue-String_String_Object|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){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=snc}{td}*Since*\\{sub-section:setDataProviderValue-String_String_Object_snc|text=|trigger=button}{sub-section}{sub-section:setDataProviderValue-String_String_Object_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:setDataProviderValue-String_String_Object_prs|text=|trigger=button}{sub-section}{sub-section:setDataProviderValue-String_String_Object_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}{tr:id=ret}{td}*Returns*\\{sub-section:setDataProviderValue-String_String_Object_ret|text=|trigger=button}{sub-section}{sub-section:setDataProviderValue-String_String_Object_ret|trigger=none|class=sIndent}[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:setDataProviderValue-String_String_Object_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setDataProviderValue-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:setDataProviderValue-String_String_Object_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setDataProviderValue-String_String_Object_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:setDataProviderValue-String_String_Object_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setDataProviderValue-String_String_Object_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=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:id=des}{td}{sub-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=prs}{td}*Parameters*\\{sub-section:setDataProviderValue-String_String_Object_String_prs|text=|trigger=button}{sub-section}{sub-section:setDataProviderValue-String_String_Object_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
\{[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:setDataProviderValue-String_String_Object_String_ret|text=|trigger=button}{sub-section}{sub-section:setDataProviderValue-String_String_Object_String_ret|trigger=none|class=sIndent}[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:setDataProviderValue-String_String_Object_String_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setDataProviderValue-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:setDataProviderValue-String_String_Object_String_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setDataProviderValue-String_String_Object_String_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:setDataProviderValue-String_String_Object_String_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setDataProviderValue-String_String_Object_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=shutdown|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;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:shutdown_des|text=|trigger=button}{sub-section}{sub-section:shutdown_des|trigger=none|class=sIndent}closes the client.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:shutdown_snc|text=|trigger=button}{sub-section}{sub-section:shutdown_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:shutdown_prs|text=|trigger=button}{sub-section}{sub-section:shutdown_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:shutdown_ret|text=|trigger=button}{sub-section}{sub-section:shutdown_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:shutdown_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:shutdown_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:shutdown_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:shutdown_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:shutdown_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:shutdown_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=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}closes 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}