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;2Return TypessWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCKsWordListBLOCK

servoy sReturnTypes2100%height: 30px;2Supported ClientssWordListSmartClientsWordListWebClientsWordListNGClientsWordListMobileClient

servoy sSummary12%30%58%height: 30px;3Methods SummaryvoidAdds a string of client information which gets stored on the server, and can be viewed on the Clients page of Servoy Server Administration Console.voidProduces a "beep" sound; commonly used to indicate an error or warning dialog.Close all visible windows (except main application window).voidCloses the currently open solution and optionally opens another solution, calling a specified global method with the specified arguments.voidCloses the currently open solution and optionally opens another solution, calling a specified global method with the specified arguments.voidCloses the currently open solution and optionally opens another solution, calling a specified global method with the specified arguments.voidCloses the currently open solution and optionally opens another solution, calling a specified global method with the specified arguments.Create a new form instance.Creates a new window that can be used for displaying forms.Creates a new window that can be used for displaying forms.Execute a program and returns output.Execute a program and returns output.Execute a program and returns output.Execute a program and returns output.voidExecute a program in the background.voidExecute a program in the background.voidExecute a program in the background.voidExecute a program in the background.voidStop and exit application.Get the active user count on the server (can be limited to current solution).This gets the currently focused active window; this can be the main application window or a modal dialog.Get the application type.Gets the count for all clients displaying the same additional information in the Clients page of Servoy Server Administration Console.Sets a UI property.Gets a string from the clipboard, null if not a string or empty.Gets the name of the current Look And Feel specified in Application Preferences.Get the name of the localhost.Get the clients' IP address.Get the names of the used client licenses (as strings in array).Returns the name of the operating system.Get all the printer names in an array.Get the screen height in pixels.Get the screen width in pixels.Returns a date object initialized on server with current date and time.Gets the HTTP server url.Returns the name of the current solution.Get the solution release number.Returns a date object initialized in client with current date and time.Get a new UUID object (also known as GUID) or convert the parameter (that can be string or byte array) to an UUID object.Get a new UUID object (also known as GUID) or convert the parameter (that can be string or byte array) to an UUID object.Get a new UUID object (also known as GUID) or convert the parameter (that can be string or byte array) to an UUID object.Get a persistent user property.Get all persistent user property names.Retrieve a valuelist as array, to get real-values for display-values.Retrieve a valuelist display-value for a real-value.Get all values from a custom or database type value list as dataset (with columns displayValue,realValue).Get all the valuelist names as array.Returns the application version.Get the main application window.Get a window by window name.Returns true if the solution is running in the developer.Check if the last printpreview did print.voidOutput something on the out stream.voidOutput something on the out stream.voidOverrides one style with another.voidPlay a sound (AU file, an AIFF file, a WAV file, and a MIDI file).Sets a UI property.voidRedo last action (if possible).Refresh a global method valuelist by forcing it to call the global method.Refresh a global method valuelist by forcing it to call the global method.voidRemoves all names given to the client via the admin page.Removes a string of client information which is stored on the server and previously was added using the application.voidSets a string object in the clipboard.voidSet if numpad enter should behave like focus next.voidSet the status area value.voidSet the status area value.voidMake a toolbar visible or invisible.voidSets a user property for this client: <br> For headless clients(including Batch Processors and Authentication clients) the user property is stored in memory and will be lost upon client restart.voidFill a custom type valuelist with values from array(s) or dataset.voidFill a custom type valuelist with values from array(s) or dataset.voidFill a custom type valuelist with values from array(s) or dataset.voidFill a custom type valuelist with values from array(s) or dataset.voidFill a custom type valuelist with values from array(s) or dataset.voidFill a custom type valuelist with values from array(s) or dataset.Show the calendar, returns selected date or null if canceled.Show the calendar, returns selected date or null if canceled.Show the calendar, returns selected date or null if canceled.Show the calendar, returns selected date or null if canceled.Show the colorChooser.Show the colorChooser.Show the font chooser dialog.Show the font chooser dialog.voidShow the form specified by the parameter, that can be a name (is case sensitive!) or a form object.Opens the i18n dialog so users can change translations.Opens the i18n dialog so users can change translations.Opens the i18n dialog so users can change translations.Shows an URL in a browser.Shows an URL in a browser.Shows an URL in a browser.Shows an URL in a browser.Shows an URL in a browser.voidSleep for specified time (in milliseconds).voidUndo last action (if possible).voidUpdates the UI (painting).voidUpdates the UI (painting).

functionservoy sDetail2100%height:30px2Methods DetailsaddClientInfoname

addClientInfo(info)

dessIndent
Adds a string of client information which gets stored on the server,
and can be viewed on the Clients page of Servoy Server Administration Console.

The new piece of client information is added on behalf of the running
Servoy client.

This function can be called more than once, if you want to add multiple
lines of client information.

NOTE:
This function can also be used with the function <em>getClientCountForInfo</em>
to count the number of clients with matching addditional client information.
prs

Parameters

sIndentinfoA line of text to be added as additional client information on behalf of the running Servoy client.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRowbeepname

beep()

dessIndent
Produces a "beep" sound; commonly used to indicate an error or warning dialog.
clients

Supported Clients

sIndentSmartClient
sam

Sample

sIdentjavascript
lastDetailRow
closeAllWindowsname

closeAllWindows()

dessIndent
Close all visible windows (except main application window). Returns true if operation was successful.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
closeSolutionname

closeSolution()

dessIndent
Closes the currently open solution and optionally opens another solution, calling a specified global method with the specified arguments.
If the user has been logged in, this function keeps the user logged in and in the newly open solution, the login is skipped and the solution goes straight to the first form.
If you want to go to a different url, you need to call application.showURL(url) before calling application.closeSolution() (this is only applicable for Web Client).
An alternative option is security.logout() which also does a log out for the user (for solutions that require authentication).
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
closeSolutionname

closeSolution(solutionToLoad)

dessIndent
Closes the currently open solution and optionally opens another solution, calling a specified global method with the specified arguments.
If the user has been logged in, this function keeps the user logged in and in the newly open solution, the login is skipped and the solution goes straight to the first form.
If you want to go to a different url, you need to call application.showURL(url) before calling application.closeSolution() (this is only applicable for Web Client).
An alternative option is security.logout() which also does a log out for the user (for solutions that require authentication).
prs

Parameters

sIndentsolutionToLoadName of the solution to load
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
closeSolutionname

closeSolution(solutionToLoad, methodName)

dessIndent
Closes the currently open solution and optionally opens another solution, calling a specified global method with the specified arguments.
If the user has been logged in, this function keeps the user logged in and in the newly open solution, the login is skipped and the solution goes straight to the first form.
If you want to go to a different url, you need to call application.showURL(url) before calling application.closeSolution() (this is only applicable for Web Client).
An alternative option is security.logout() which also does a log out for the user (for solutions that require authentication).
prs

Parameters

sIndentsolutionToLoadName of the solution to loadmethodNameName of the global method to call
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
closeSolutionname

closeSolution(solutionToLoad, methodName, methodArgument)

dessIndent
Closes the currently open solution and optionally opens another solution, calling a specified global method with the specified arguments.
If the user has been logged in, this function keeps the user logged in and in the newly open solution, the login is skipped and the solution goes straight to the first form.
If you want to go to a different url, you need to call application.showURL(url) before calling application.closeSolution() (this is only applicable for Web Client).
An alternative option is security.logout() which also does a log out for the user (for solutions that require authentication).
prs

Parameters

sIndentsolutionToLoadName of the solution to loadmethodNameName of the global method to callmethodArgumentArgument passed to the global method
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
createNewFormInstancename

createNewFormInstance(designFormName, newInstanceScriptName)

dessIndent
Create a new form instance.
prs

Parameters

sIndentdesignFormNameName of the design formnewInstanceScriptNameName of the new form instance
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
createWindowname

createWindow(windowName, type)

dessIndent
Creates a new window that can be used for displaying forms. Initially the window is not visible.
If there is already a window with the given name, it will be closed and destroyed prior to creating the new window.
Use the form controller show() and showRecords() methods in order to show a form in this window.
prs

Parameters

sIndentwindowNamethe name of the window. Should not be null.typethe type of the window. Can be one of JSWindow.DIALOG, JSWindow.MODAL_DIALOG, JSWindow.WINDOW. (WINDOW does not work for NGClient)
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
createWindowname

createWindow(windowName, type, parentWindow)

dessIndent
Creates a new window that can be used for displaying forms. Initially the window is not visible.
If there is already a window with the given name, it will be closed and destroyed prior to creating the new window.
Use the form controller show() and showRecords() methods in order to show a form in this window.
prs

Parameters

sIndentwindowNamethe name of the window. Should not be null.typethe type of the window. Can be one of JSWindow.DIALOG, JSWindow.MODAL_DIALOG, JSWindow.WINDOW (WINDOW doesn't work in NGClient).parentWindowthe parent JSWindow object. If it is not specified, the current window will be used as parent. This parameter is only used by dialogs.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
executeProgramname

executeProgram(program)

dessIndent
Execute a program and returns output. Specify the cmd as you would do in a console.
prs

Parameters

sIndentprogram(fullpath) of the program to execute
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
executeProgramname

executeProgram(program, params)

dessIndent
Execute a program and returns output. Specify the cmd as you would do in a console.
prs

Parameters

sIndentprogram(fullpath) of the program to executeparamsan array of strings as program arguments
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
executeProgramname

executeProgram(program, params, environmentVars)

dessIndent
Execute a program and returns output. Specify the cmd as you would do in a console.
prs

Parameters

sIndentprogram(fullpath) of the program to executeparamsan array of strings as program argumentsenvironmentVarsarray of strings, each element of which has environment variable settings in the format name=value, or null if the subprocess should inherit the environment of the current process.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
executeProgramname

executeProgram(program, params, environmentVars, startDir)

dessIndent
Execute a program and returns output. Specify the cmd as you would do in a console.
prs

Parameters

sIndentprogram(fullpath) of the program to executeparamsan array of strings as program argumentsenvironmentVarsarray of strings, each element of which has environment variable settings in the format name=value, or null if the subprocess should inherit the environment of the current process.startDirthe working directory of the subprocess, or null if the subprocess should inherit the working directory of the current process.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
executeProgramInBackgroundname

executeProgramInBackground(program)

dessIndent
Execute a program in the background. Specify the cmd as you would do in a console.
prs

Parameters

sIndentprogram(fullpath) of the program to execute
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
executeProgramInBackgroundname

executeProgramInBackground(program, params)

dessIndent
Execute a program in the background. Specify the cmd as you would do in a console.
prs

Parameters

sIndentprogram(fullpath) of the program to executeparamsan array of strings as program arguments
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
executeProgramInBackgroundname

executeProgramInBackground(program, params, environmentVars)

dessIndent
Execute a program in the background. Specify the cmd as you would do in a console.
prs

Parameters

sIndentprogram(fullpath) of the program to executeparamsan array of strings as program argumentsenvironmentVarsarray of strings, each element of which has environment variable settings in the format name=value, or null if the subprocess should inherit the environment of the current process.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
executeProgramInBackgroundname

executeProgramInBackground(program, params, environmentVars, startDir)

dessIndent
Execute a program in the background. Specify the cmd as you would do in a console.
prs

Parameters

sIndentprogram(fullpath) of the program to executeparamsan array of strings as program argumentsenvironmentVarsarray of strings, each element of which has environment variable settings in the format name=value, or null if the subprocess should inherit the environment of the current process.startDirthe working directory of the subprocess, or null if the subprocess should inherit the working directory of the current process.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
exitname

exit()

dessIndent
Stop and exit application.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getActiveClientCountname

getActiveClientCount(currentSolutionOnly)

dessIndent
Get the active user count on the server (can be limited to current solution).
prs

Parameters

sIndentcurrentSolutionOnlyBoolean (true) to get the active user count on server only to the current solution
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getActiveWindowname

getActiveWindow()

dessIndent
This gets the currently focused active window; this can be the main application window or a modal dialog.
For a webclient getWindow() can return the main window that is not really the main for the current tab in the browser
that can return the previous tab that a user could have opened. For this method is better suited because this
will give you the actual tab in the browser. Another call would be form.controller.getWindow() of a form that you know in which window it resides.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getApplicationTypename

getApplicationType()

dessIndent
Get the application type.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
getClientCountForInfoname

getClientCountForInfo(info)

dessIndent
Gets the count for all clients displaying the same additional information
in the Clients page of Servoy Server Administration Console.
prs

Parameters

sIndentinfoThe additional client info string to search for.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getClientPropertyname

getClientProperty(name)

dessIndent
Sets a UI property.
prs

Parameters

sIndentnameName of the client property
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getClipboardStringname

getClipboardString()

dessIndent
Gets a string from the clipboard, null if not a string or empty.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient
sam

Sample

sIdentjavascript
lastDetailRow
getCurrentLookAndFeelNamename

getCurrentLookAndFeelName()

dessIndent
Gets the name of the current Look And Feel specified in Application Preferences.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient
sam

Sample

sIdentjavascript
lastDetailRow
getHostNamename

getHostName()

dessIndent
Get the name of the localhost.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getIPAddressname

getIPAddress()

dessIndent
Get the clients' IP address.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getLicenseNamesname

getLicenseNames()

dessIndent
Get the names of the used client licenses (as strings in array).
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getOSNamename

getOSName()

dessIndent
Returns the name of the operating system.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getPrintersname

getPrinters()

dessIndent
Get all the printer names in an array.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient
sam

Sample

sIdentjavascript
lastDetailRow
getScreenHeightname

getScreenHeight()

dessIndent
Get the screen height in pixels.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getScreenWidthname

getScreenWidth()

dessIndent
Get the screen width in pixels.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getServerTimeStampname

getServerTimeStamp()

dessIndent
Returns a date object initialized on server with current date and time.
For NG and web clients this is the same as new Date() in scripting.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getServerURLname

getServerURL()

dessIndent
Gets the HTTP server url.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
getSolutionNamename

getSolutionName()

dessIndent
Returns the name of the current solution.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getSolutionReleasename

getSolutionRelease()

dessIndent
Get the solution release number.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getTimeStampname

getTimeStamp()

dessIndent
Returns a date object initialized in client with current date and time.
This should be used instead of new Date() for webclients when the clients are in different times zones then the server.
Then this call will really return a time that is the locals webclients time.
For NG clients this is only useful when displaying on the client using format property (Use local time), and then
this is equivalent to new Date() on the client side, so basically this can be used to pre-fill with 'now' such a display.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getUUIDname

getUUID()

dessIndent
Get a new UUID object (also known as GUID) or convert the parameter (that can be string or byte array) to an UUID object. A table column marked as UUID will work with such objects.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getUUIDname

getUUID(byteArray)

dessIndent
Get a new UUID object (also known as GUID) or convert the parameter (that can be string or byte array) to an UUID object. A table column marked as UUID will work with such objects.
prs

Parameters

sIndentbyteArrayByte array representing an uuid
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getUUIDname

getUUID(uuidString)

dessIndent
Get a new UUID object (also known as GUID) or convert the parameter (that can be string or byte array) to an UUID object. A table column marked as UUID will work with such objects.
prs

Parameters

sIndentuuidStringString representing an uuid
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getUserPropertyname

getUserProperty(name)

dessIndent
Get a persistent user property.
prs

Parameters

sIndentnameName of the property
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
getUserPropertyNamesname

getUserPropertyNames()

dessIndent
Get all persistent user property names.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getValueListArrayname

getValueListArray(name)

dessIndent
Retrieve a valuelist as array, to get real-values for display-values.
NOTE: this doesn't return a value for a valuelist that depends on a database relation or is a global method valuelist.
prs

Parameters

sIndentnameThe name of the valuelist
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getValueListDisplayValuename

getValueListDisplayValue(name, realValue)

dessIndent
Retrieve a valuelist display-value for a real-value.
NOTE: this doesn't return a value for a valuelist that depends on a database relation or is a global method valuelist.
prs

Parameters

sIndentnameName of the valuelistrealValueReal value of the valuelist
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getValueListItemsname

getValueListItems(name)

dessIndent
Get all values from a custom or database type value list as dataset (with columns displayValue,realValue).
NOTE: this doesn't return a value for a valuelist that depends on a database relation or is a global method valuelist.
prs

Parameters

sIndentnameName of the valuelist
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getValueListNamesname

getValueListNames()

dessIndent
Get all the valuelist names as array.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getVersionname

getVersion()

dessIndent
Returns the application version.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getWindowname

getWindow()

dessIndent
Get the main application window. This is the window that is created first for this client.

In a smart client this is always just the first started window where the solution is loaded in.
In a webclient the user may open the same solution in a new tab in the same browser. In that case the main solution
window will always be the first opened tab, even if that one was already closed.
application.getActiveWindow() will always return the currently active/focused window or dialog.
If you need the window of the current top-level form, controller.getWindow() of that form will
always return the correct window.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getWindowname

getWindow(name)

dessIndent
Get a window by window name. When not supplying a name, the main application window is grabbed.
prs

Parameters

sIndentnamethe name of the window. If not specified, the main application JSWindow will be returned.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
isInDevelopername

isInDeveloper()

dessIndent
Returns true if the solution is running in the developer.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
isLastPrintPreviewPrintedname

isLastPrintPreviewPrinted()

dessIndent
Check if the last printpreview did print.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient
sam

Sample

sIdentjavascript
lastDetailRow
outputname

output(msg)

dessIndent
Output something on the out stream. (if running in debugger view output console tab)
prs

Parameters

sIndentmsgObject to send to output stream
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
outputname

output(msg, level)

dessIndent
Output something on the out stream. (if running in debugger view output console tab)
prs

Parameters

sIndentmsgObject to send to output streamlevelthe log level where it should log to.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
overrideStylename

overrideStyle(originalStyleName, newStyleName)

dessIndent
Overrides one style with another. In NGClient, it overrides the original stylesheet media defined on a solution with another media.
prs

Parameters

sIndentoriginalStyleNameName of the style to overridenewStyleNameName of the new style
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
playSoundname

playSound(url)

dessIndent
Play a sound (AU file, an AIFF file, a WAV file, and a MIDI file).
prs

Parameters

sIndenturlURL of the sound file
clients

Supported Clients

sIndentSmartClient,WebClient
sam

Sample

sIdentjavascript
lastDetailRow
putClientPropertyname

putClientProperty(name, value)

dessIndent
Sets a UI property.
prs

Parameters

sIndentnameName of the client propertyvalueNew value of the client property
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
redoname

redo()

dessIndent
Redo last action (if possible).
clients

Supported Clients

sIndentSmartClient
sam

Sample

sIdentjavascript
lastDetailRow
refreshGlobalMethodValueListname

refreshGlobalMethodValueList(element)

dessIndent
Refresh a global method valuelist by forcing it to call the global method. The element which has the valuelist must be provided.
If there is no propertyName specified, the element must have only one valuelist property.
prs

Parameters

sIndentelementform element
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
refreshGlobalMethodValueListname

refreshGlobalMethodValueList(element, propertyName)

dessIndent
Refresh a global method valuelist by forcing it to call the global method. The element which has the valuelist must be provided.
The valuelist is searched under provided property from the spec - for usage in NGClient custom components.
prs

Parameters

sIndentelementform elementpropertyNamename of property from the spec
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
removeAllClientInfoname

removeAllClientInfo()

dessIndent
Removes all names given to the client via the admin page.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
removeClientInfoname

removeClientInfo(info)

dessIndent
Removes a string of client information which is stored on the server and
previously was added using the application.addClientInfo('client info')

This function can be called more than once, if you want to delete multiple
lines of client information.
prs

Parameters

sIndentinfoA line of text to be removed from the client information on behalf of the running Servoy client.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
setClipboardContentname

setClipboardContent(string)

dessIndent
Sets a string object in the clipboard.
prs

Parameters

sIndentstringNew content of the clipboard
clients

Supported Clients

sIndentSmartClient
sam

Sample

sIdentjavascript
lastDetailRow
setNumpadEnterAsFocusNextEnabledname

setNumpadEnterAsFocusNextEnabled(enabled)

dessIndent
Set if numpad enter should behave like focus next.
prs

Parameters

sIndentenabledBoolean (true) if numpad enter should behave like focus next
clients

Supported Clients

sIndentSmartClient
sam

Sample

sIdentjavascript
lastDetailRow
setStatusTextname

setStatusText(text)

dessIndent
Set the status area value.
prs

Parameters

sIndenttextNew status text
clients

Supported Clients

sIndentSmartClient,WebClient
sam

Sample

sIdentjavascript
lastDetailRow
setStatusTextname

setStatusText(text, tooltip)

dessIndent
Set the status area value.

NOTE: Most modern browsers do not support status bar and status text anymore. This method sets status property of the window using javascript.
prs

Parameters

sIndenttextNew status texttooltipStatus tooltip text
clients

Supported Clients

sIndentSmartClient,WebClient
sam

Sample

sIdentjavascript
lastDetailRow
setToolbarVisiblename

setToolbarVisible(name, visible)

dessIndent
Make a toolbar visible or invisible.
prs

Parameters

sIndentnameName of the toolbarvisibleVisibility of the toolbar
clients

Supported Clients

sIndentSmartClient
sam

Sample

sIdentjavascript
lastDetailRow
setUserPropertyname

setUserProperty(name, value)

dessIndent
Sets a user property for this client: <br>
For headless clients(including Batch Processors and Authentication clients) the user property is stored in memory and will be lost upon client restart.
<br>
For Web Client the user property will be stored in a persistent cookie
<br>
For Smart Client it will be stored in a properties file on the client machine.
prs

Parameters

sIndentnameName of the user propertyvalueNew value of the user property
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
setValueListItemsname

setValueListItems(name, dataset)

dessIndent
Fill a custom type valuelist with values from array(s) or dataset.

NOTE: if you modify values for checkbox/radio field, note that having one value in valuelist is a special case, so switching between one value and 0/multiple values may have side effects
NOTE: This is expensive operation, which triggers refresh of all visible forms. Over usage of this method may inflict performance issues.
prs

Parameters

sIndentnameName of the valuelistdatasetDataset with display/real values
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
setValueListItemsname

setValueListItems(name, dataset, autoconvert)

dessIndent
Fill a custom type valuelist with values from array(s) or dataset.

NOTE: if you modify values for checkbox/radio field, note that having one value in valuelist is a special case, so switching between one value and 0/multiple values may have side effects
NOTE: This is expensive operation, which triggers refresh of all visible forms. Over usage of this method may inflict performance issues.
prs

Parameters

sIndentnameName of the valuelistdatasetDataset with display/real valuesautoconvertBoolean (true) if display values and return values should be converted to numbers
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
setValueListItemsname

setValueListItems(name, displayValues)

dessIndent
Fill a custom type valuelist with values from array(s) or dataset.

NOTE: if you modify values for checkbox/radio field, note that having one value in valuelist is a special case, so switching between one value and 0/multiple values may have side effects
NOTE: This is expensive operation, which triggers refresh of all visible forms. Over usage of this method may inflict performance issues.
prs

Parameters

sIndentnameName of the valuelistdisplayValuesDisplay values array
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
setValueListItemsname

setValueListItems(name, displayValues, autoconvert)

dessIndent
Fill a custom type valuelist with values from array(s) or dataset.

NOTE: if you modify values for checkbox/radio field, note that having one value in valuelist is a special case, so switching between one value and 0/multiple values may have side effects
NOTE: This is expensive operation, which triggers refresh of all visible forms. Over usage of this method may inflict performance issues.
prs

Parameters

sIndentnameName of the valuelistdisplayValuesDisplay values arrayautoconvertBoolean (true) if display values and return values should be converted to numbers
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
setValueListItemsname

setValueListItems(name, displayValues, realValues)

dessIndent
Fill a custom type valuelist with values from array(s) or dataset.

NOTE: if you modify values for checkbox/radio field, note that having one value in valuelist is a special case, so switching between one value and 0/multiple values may have side effects
NOTE: This is expensive operation, which triggers refresh of all visible forms. Over usage of this method may inflict performance issues.
prs

Parameters

sIndentnameName of the valuelistdisplayValuesDisplay values arrayrealValuesReal values array
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
setValueListItemsname

setValueListItems(name, displayValues, realValues, autoconvert)

dessIndent
Fill a custom type valuelist with values from array(s) or dataset.

NOTE: if you modify values for checkbox/radio field, note that having one value in valuelist is a special case, so switching between one value and 0/multiple values may have side effects
NOTE: This is expensive operation, which triggers refresh of all visible forms. Over usage of this method may inflict performance issues.
prs

Parameters

sIndentname ;displayValuesDisplay values arrayrealValuesReal values arrayautoconvertBoolean (true) if display values and return values should be converted to numbers
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
showCalendarname

showCalendar()

dessIndent
Show the calendar, returns selected date or null if canceled. Initial value and date format can be also specified.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient
sam

Sample

sIdentjavascript
lastDetailRow
showCalendarname

showCalendar(dateFormat)

dessIndent
Show the calendar, returns selected date or null if canceled. Initial value and date format can be also specified.
prs

Parameters

sIndentdateFormatDate format
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient
sam

Sample

sIdentjavascript
lastDetailRow
showCalendarname

showCalendar(selectedDate)

dessIndent
Show the calendar, returns selected date or null if canceled. Initial value and date format can be also specified.
prs

Parameters

sIndentselectedDateDefault selected date
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient
sam

Sample

sIdentjavascript
lastDetailRow
showCalendarname

showCalendar(selectedDate, dateFormat)

dessIndent
Show the calendar, returns selected date or null if canceled. Initial value and date format can be also specified.
prs

Parameters

sIndentselectedDateDefault selected datedateFormatDate format
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient
sam

Sample

sIdentjavascript
lastDetailRow
showColorChoosername

showColorChooser()

dessIndent
Show the colorChooser. Returned value is in format #RRGGBB or null if canceled.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient
sam

Sample

sIdentjavascript
lastDetailRow
showColorChoosername

showColorChooser(colorString)

dessIndent
Show the colorChooser. Returned value is in format #RRGGBB or null if canceled.
prs

Parameters

sIndentcolorStringDefault color
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient
sam

Sample

sIdentjavascript
lastDetailRow
showFontChoosername

showFontChooser()

dessIndent
Show the font chooser dialog. Returns the selected font. Can specify a default font.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient
sam

Sample

sIdentjavascript
lastDetailRow
showFontChoosername

showFontChooser(defaultFont)

dessIndent
Show the font chooser dialog. Returns the selected font. Can specify a default font.
prs

Parameters

sIndentdefaultFontDefault font
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient
sam

Sample

sIdentjavascript
lastDetailRow
showFormname

showForm(form)

dessIndent
Show the form specified by the parameter, that can be a name (is case sensitive!) or a form object.
This will show the form in the active/currently focused window. So when called from a form in a dialog the dialog will show the form.
prs

Parameters

sIndentformForm object or name
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
showI18NDialogname

showI18NDialog()

dessIndent
Opens the i18n dialog so users can change translations. Returns the key selected by the user (not it's translation)  or null if cancel is pressed. Optional parameters specify the initial selections in the dialog.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient
sam

Sample

sIdentjavascript
lastDetailRow
showI18NDialogname

showI18NDialog(keyToSelect)

dessIndent
Opens the i18n dialog so users can change translations. Returns the key selected by the user (not it's translation)  or null if cancel is pressed. Optional parameters specify the initial selections in the dialog.
prs

Parameters

sIndentkeyToSelectDefault selected key
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient
sam

Sample

sIdentjavascript
lastDetailRow
showI18NDialogname

showI18NDialog(keyToSelect, languageToSelect)

dessIndent
Opens the i18n dialog so users can change translations. Returns the key selected by the user (not it's translation)  or null if cancel is pressed. Optional parameters specify the initial selections in the dialog.
prs

Parameters

sIndentkeyToSelectDefault selected keylanguageToSelectDefault selected language
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient
sam

Sample

sIdentjavascript
lastDetailRow
showURLname

showURL(url)

dessIndent
Shows an URL in a browser.
prs

Parameters

sIndenturlURL to show
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
showURLname

showURL(url, browserTarget)

dessIndent
Shows an URL in a browser.
prs

Parameters

sIndenturlURL to showbrowserTargetTarget frame or named dialog/window
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
showURLname

showURL(url, browserTarget, timeout)

dessIndent
Shows an URL in a browser.
prs

Parameters

sIndenturlURL to showbrowserTargetTarget frame or named dialog/windowtimeoutA timeout in seconds when the url should be shown
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
showURLname

showURL(url, browserTarget, browserTargetOptions)

dessIndent
Shows an URL in a browser.
prs

Parameters

sIndenturlURL to showbrowserTargetTarget frame or named dialog/windowbrowserTargetOptionsDialog options used when a dialog is specified / a timeout in seconds when the url should be shown
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
showURLname

showURL(url, browserTarget, browserTargetOptions, timeout)

dessIndent
Shows an URL in a browser.
prs

Parameters

sIndenturlURL to showbrowserTargetTarget frame or named dialog/windowbrowserTargetOptionsDialog options used when a dialog is specified / a timeout in seconds when the url should be showntimeoutA timeout in seconds when the url should be shown
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
sleepname

sleep(ms)

dessIndent
Sleep for specified time (in milliseconds).
prs

Parameters

sIndentmsSleep time in milliseconds
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
undoname

undo()

dessIndent
Undo last action (if possible).
clients

Supported Clients

sIndentSmartClient
sam

Sample

sIdentjavascript
lastDetailRow
updateUIname

updateUI()

dessIndent
Updates the UI (painting). If in a script an element changed and the script continues doing
things, you can give an number in ms how long this can take.
Warning: this gives the UI time to paint, but this also means that it will give the ui time to respond to all other events,
so if a user keeps clicking on other stuff this will also be handled right away inside this call.

NOTE:In NGClient, this method will send to browser all outstanding changes. If called too often (with many changes), can cause performance issues.
clients

Supported Clients

sIndentSmartClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
updateUIname

updateUI(milliseconds)

dessIndent
Updates the UI (painting). If in a script an element changed and the script continues doing
things, you can give an number in ms how long this can take.
Warning: this gives the UI time to paint, but this also means that it will give the ui time to respond to all other events,
so if a user keeps clicking on other stuff this will also be handled right away inside this call.

NOTE:In NGClient, this method will send to browser all outstanding changes. If called too often (with many changes), can cause performance issues.
prs

Parameters

sIndentmillisecondsHow long the update should take in milliseconds
clients

Supported Clients

sIndentSmartClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow