Child pages
  • JSClient

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Cache
indextrue
refresh100d
showRefreshtrue
iddoc

...

titleRefresh page
showDatetrue
retryEnable

...

 

...

servoy sReturnTypes2100%height: 30px;2Supported ClientssWordList

...

SmartClientsWordList

...

WebClientsWordList

...

 

NGClient

...

servoy sSummary12%30%58%height: 30px;3Constants SummaryConstant that is returned as a JSEvent type when in the callback method when it executed normally.Constant that is returned as a JSEvent type when in the callback method when an exception occurred.

 

...

servoy sSummary12%30%58%height: 30px;3Methods SummaryGets the id of the client.Get a data-provider value.Get a data-provider value.returns true if this client is still valid/usable.voidQueues a method call on the remote server, without a callback method.voidQueues a method call on the remote server.Set a data-provider value.Set a data-provider value.voidcloses the client.voidcloses the client.

 

...

constantservoy sDetail2100%height:30px2Constants DetailsCALLBACK_EVENTname

CALLBACK_EVENT

dessIndent
Constant that is returned as a JSEvent type when in the callback method when it executed normally.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow

...

CALLBACK_EXCEPTION_EVENTname

CALLBACK_EXCEPTION_EVENT

dessIndent
Constant that is returned as a JSEvent type when in the callback method when an exception occurred.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow

...

 

functionservoy sDetail2100%height:30px2Methods DetailsgetClientIDname

getClientID()

dessIndent
Gets the id of the client.

This client id can be used to find the client from the headless client plugin.
Note that this client id is not the same id as the id displayed on the Aplicationb Server admin page.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow

...

getDataProviderValuename

getDataProviderValue(contextName, dataprovider)

dessIndent
Get a data-provider value.
prs

Parameters

sIndentcontextNameThe context of the given method, null if it is global method or a form name for a form methoddataproviderthe data-provider name as seen in Servoy
ret

Returns

sIndent the value for the data-provider.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow

...

getDataProviderValuename

getDataProviderValue(contextName, dataprovider, methodName)

dessIndent
Get a data-provider value.
prs

Parameters

sIndentcontextNameThe context of the given method; null if it is global method or a form name for a form method.dataproviderthe data-provider name as seen in Servoy.methodNameif 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.
ret

Returns

sIndent the value of the data-provider.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow

...

isValidname

isValid()

dessIndent
returns true if this client is still valid/usable.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
queueMethodname

queueMethod(contextName, methodName, args)

dessIndent
Queues a method call on the remote server, without a callback method.
Please note that calling queueMethod without a callback does not return anything: no result of the remote method or no exception if something went wrong.
prs

Parameters

sIndentcontextNameThe context of the given method, null if it is global method or a form name for a form method.methodNameThe method name.argsThe arguments that should be passed to the method.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow

...

queueMethodname

queueMethod(contextName, methodName, args, notifyCallBackMethod)

dessIndent
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.
prs

Parameters

sIndentcontextNameThe context of the given method, null if it is global method or a form name for a form method.methodNameThe method name.argsThe arguments that should be passed to the method.notifyCallBackMethodThe callback method that is called when the execution is finished.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow

...

setDataProviderValuename

setDataProviderValue(contextName, dataprovider, value)

dessIndent
Set a data-provider value.
prs

Parameters

sIndentcontextNameThe context of the given method, null if it is global method or a form name for a form method.dataproviderthe data-provider name as seen in Servoy.valuethe value to set.
ret

Returns

sIndent the old value or null if no change.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow

...

setDataProviderValuename

setDataProviderValue(contextName, dataprovider, value, methodName)

dessIndent
Set a data-provider value.
prs

Parameters

sIndentcontextNameThe context of the given method, null if it is global method or a form name for a form methoddataproviderthe data-provider name as seen in Servoyvaluethe value to setmethodNameif 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.
ret

Returns

sIndent the old value or null if no change
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow

...

shutdownname

shutdown()

dessIndent
closes the client.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow

...

shutdownname

shutdown(force)

dessIndent
closes the client.
prs

Parameters

sIndentforce ;
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow

...