Supported Clients
NGClient

Methods Summary
Object
copyObject(value)
Can be used to deep copy a custom value.
String
getMediaUrl(bytes)
This will generate a url from a byte array so that the client can get the bytes from that url.
QBSelect
getQuerySelect(dataSource)
Get select query for dataSource
JSFoundSet
getViewFoundSet(name, query)

Boolean
hideForm(formName)
Hide a form directly on the server for instance when a tab will change on the client, so it won't need to do a round trip for hiding the form through the browser's component.

Methods Details

copyObject(value)

Can be used to deep copy a custom value.

Parameters

Object
value
the value to be copied

Returns

Object a copy of the value object, the same as constructing the object in javascript from scratch

Supported Clients

NGClient

Sample

var eventSourceCopy = servoyApi.copyObject(eventSource);

getMediaUrl(bytes)

This will generate a url from a byte array so that the client can get the bytes from that url.

Parameters

Array
bytes
The value where an url should be created for

Returns

String the url where the bytes can be downloaded from

Supported Clients

NGClient

Sample

var url = servoyApi.getMediaUrl(bytes);

getQuerySelect(dataSource)

Get select query for dataSource

Parameters

String
dataSource
the dataSource

Returns

QBSelect QB select for the dataSource

Supported Clients

NGClient

Sample

getViewFoundSet(name, query)

Parameters

String
name
;
QBSelect
query
;

Returns

JSFoundSet

Supported Clients

NGClient

Sample

hideForm(formName)

Hide a form directly on the server for instance when a tab will change on the client, so it won't need to do a round trip
for hiding the form through the browser's component.

Parameters

Object
formName
the form to hide

Returns

Boolean true if the form was hidden

Supported Clients

NGClient

Sample

servoyApi.hideForm(formToHideName)