Application
Return Types
APPLICATION_TYPES,CLIENTDESIGN,DRAGNDROP,ELEMENT_TYPES,CSSPosition,Renderable,JSDimension,JSPoint,JSDNDEvent,JSEvent,JSRenderEvent,JSUpload,JSWindow,JSLogger,JSLogBuilder,LOGGINGLEVEL,UICONSTANTS,UUID,WEBCONSTANTS,NGCONSTANTS,
Methods Summary
Type | Name | Summary |
---|---|---|
void | 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.. | |
Close all visible windows (except main application window).. | ||
void | Closes the currently open solution and optionally opens another solution, calling a specified global method with the specified arguments.. | |
void | Closes the currently open solution and optionally opens another solution, calling a specified global method with the specified arguments.. | |
void | Closes the currently open solution and optionally opens another solution, calling a specified global method with the specified arguments.. | |
void | Closes the currently open solution and optionally opens another solution, calling a specified global method with the specified arguments.. | |
void | Closes 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.. | ||
void | Runs at method at the given delay in milliseconds.. | |
void | Runs at method at the given delay in milliseconds with the arguments given to the method.. | |
Execute a program and returns output.. | ||
Execute a program and returns output.. | ||
Execute a program and returns output.. | ||
Execute a program and returns output.. | ||
void | Execute a program in the background.. | |
void | Execute a program in the background.. | |
void | Execute a program in the background.. | |
void | Execute a program in the background.. | |
void | Stop and exit application.. | |
This generates a browser function for the given function string that can be executed in the browser by a component that needs a function for a certain property value.. | ||
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.. | ||
Get the name of the localhost.. | ||
Get the clients' IP address.. | ||
Get the names of the used client licenses (as strings in array).. | ||
Get a JSLogger instance which offers an API for logging with arguments.. | ||
Get a JSLogger instance which offers an API for logging with arguments.. | ||
Get the media url that can be used to server a media in NGClient.. | ||
Returns the name of the operating system of the client.. | ||
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.. | ||
Get the uuid from this server instance (the same value that is shown on the admin page). | ||
Returns the name of the current solution.. | ||
Get the solution release number.. | ||
Get the parameters which are provided by startup.. | ||
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 full version information of this solution and all its modules.. | ||
Get the main application window.. | ||
Get a window by window name.. | ||
Returns true if the solution is running in the developer.. | ||
void | Output something on the out stream.. | |
void | Output something on the out stream.. | |
void | Overrides one style with another.. | |
Sets a UI property.. | ||
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.. | ||
void | Removes all names given to the client via the admin page.. | |
void | Removes all user properties.. | |
Removes a string of client information which is stored on the server and previously was added using the application.. | ||
void | Removes a user property.. | |
void | Sets a string object in the clipboard.. | |
void | Sets a user property for this client: In NGClient this is stored in the locale storage of the browser, so it will be persisted over restarts as long as the user didn't clear the data.. | |
void | Fill a custom type valuelist with values from array(s) or dataset.. | |
void | Fill a custom type valuelist with values from array(s) or dataset.. | |
void | Fill a custom type valuelist with values from array(s) or dataset.. | |
void | Fill a custom type valuelist with values from array(s) or dataset.. | |
void | Fill a custom type valuelist with values from array(s) or dataset.. | |
void | Fill a custom type valuelist with values from array(s) or dataset.. | |
void | Show the form specified by the parameter, that can be a name (is case sensitive!) or a form object.. | |
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.. | ||
void | Sleep for specified time (in milliseconds).. | |
void | Updates the UI (painting).. | |
void | Updates the UI (painting).. |
Methods Details
addClientInfo(info)
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 getClientCountForInfo to count the number of clients with matching addditional client information.
Parameters String info A line of text to be added as additional client information on behalf of the running Servoy client.
Returns void
Sample
closeAllWindows()
Close all visible windows (except main application window). Returns true if operation was successful.
Returns Boolean Boolean true if all windows were closed and false otherwise.
Sample
closeSolution()
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).
Returns void
Sample
closeSolution(solutionToLoad)
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).
Parameters String solutionToLoad Name of the solution to load
Returns void
Sample
closeSolution(solutionToLoad, methodArgument)
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).
Parameters String solutionToLoad Name of the solution to load Object methodArgument Argument passed to the solution onOpen
Returns void
Sample
closeSolution(solutionToLoad, methodName)
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).
Parameters String solutionToLoad Name of the solution to load String methodName Name of the global method to call
Returns void
Sample
closeSolution(solutionToLoad, methodName, methodArgument)
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).
Parameters String solutionToLoad Name of the solution to load String methodName Name of the global method to call Object methodArgument Argument passed to the global method
Returns void
Sample
createNewFormInstance(designFormName, newInstanceScriptName)
Create a new form instance.
Parameters String designFormName Name of the design form String newInstanceScriptName Name of the new form instance
Returns Boolean Boolean (true) if the instance was created succesfully, (false) otherwise
Sample
createWindow(windowName, type)
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.
Parameters String windowName the name of the window. Should not be null. Number type the type of the window. Can be one of JSWindow.DIALOG, JSWindow.MODAL_DIALOG, JSWindow.WINDOW. (WINDOW does not work for NGClient)
Returns JSWindow the newly created window.
Sample
createWindow(windowName, type, parentWindow)
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.
Parameters String windowName the name of the window. Should not be null. Number type the type of the window. Can be one of JSWindow.DIALOG, JSWindow.MODAL_DIALOG, JSWindow.WINDOW (WINDOW doesn't work in NGClient). JSWindow parentWindow the parent JSWindow object. If it is not specified, the current window will be used as parent. This parameter is only used by dialogs.
Returns JSWindow the newly created window.
Sample
executeLater(function, delay)
Runs at method at the given delay in milliseconds.
This is like a simple scheduler to quickly run something after a bit of delay
Parameters Function function The function to call Number delay The millis that has to elapse before the function is called.
Returns void
Sample
executeLater(function, delay, arguments)
Runs at method at the given delay in milliseconds with the arguments given to the method.
This is like a simple scheduler to quickly run something after a bit of delay
Parameters Function function The function to call Number delay The millis that has to elapse before the function is called. Array arguments The arguments that are given to the function when called.
Returns void
Sample
executeProgram(program)
Execute a program and returns output. Specify the cmd as you would do in a console.
Parameters String program (fullpath) of the program to execute
Returns String The output generated by the program execution.
Sample
executeProgram(program, params)
Execute a program and returns output. Specify the cmd as you would do in a console.
Parameters String program (fullpath) of the program to execute Array params an array of strings as program arguments
Returns String The output generated by the program execution.
Sample
executeProgram(program, params, environmentVars)
Execute a program and returns output. Specify the cmd as you would do in a console.
Parameters String program (fullpath) of the program to execute Array params an array of strings as program arguments Array environmentVars array 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.
Returns String The output generated by the program execution.
Sample
executeProgram(program, params, environmentVars, startDir)
Execute a program and returns output. Specify the cmd as you would do in a console.
Parameters String program (fullpath) of the program to execute Array params an array of strings as program arguments Array environmentVars array 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. String startDir the working directory of the subprocess, or null if the subprocess should inherit the working directory of the current process.
Returns String The output generated by the program execution.
Sample
executeProgramInBackground(program)
Execute a program in the background. Specify the cmd as you would do in a console.
Parameters String program (fullpath) of the program to execute
Returns void
Sample
executeProgramInBackground(program, params)
Execute a program in the background. Specify the cmd as you would do in a console.
Parameters String program (fullpath) of the program to execute Array params an array of strings as program arguments
Returns void
Sample
executeProgramInBackground(program, params, environmentVars)
Execute a program in the background. Specify the cmd as you would do in a console.
Parameters String program (fullpath) of the program to execute Array params an array of strings as program arguments Array environmentVars array 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.
Returns void
Sample
executeProgramInBackground(program, params, environmentVars, startDir)
Execute a program in the background. Specify the cmd as you would do in a console.
Parameters String program (fullpath) of the program to execute Array params an array of strings as program arguments Array environmentVars array 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. String startDir the working directory of the subprocess, or null if the subprocess should inherit the working directory of the current process.
Returns void
Sample
exit()
Stop and exit application.
Returns void
Sample
generateBrowserFunction(functionString)
This generates a browser function for the given function string that can be executed in the browser by a component that needs a function for a certain property value. The resulting object should be assigned into a config/property object that is then assigned to a component The component will receive this function as a real function object in TiNG (but still as a plain string that needs to be evalled in NG1)
This is needed because in TiNG it is not allowed, because of the Content Security Policy (CSP) that is enforced, to eval(string) to get a function object (that then can be executed later on)
This is a more dynamic variant of the spec property "clientfunction". You do not need to use this for properties/arguments/return values that are declared to have "clientfunction" type in the .spec file, but rather for when you want to give it inside plain 'object' typed values. From 2023.09 also map and json property types (even nested if configured in the spec correctly) are supported.
Parameters String functionString The function string of a js function that should be running in the clients browser.
Returns Object An object that can be assignd to a property of an component or custom type. (nested in an object/map/json type)
Sample
getActiveClientCount(currentSolutionOnly)
Get the active user count on the server (can be limited to current solution).
Parameters Boolean currentSolutionOnly Boolean (true) to get the active user count on server only to the current solution
Returns Number Active user count on the server
Sample
getActiveWindow()
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.
Returns JSWindow the current active/focussed window.
Sample
getApplicationType()
Get the application type.
Returns Number Constant application type
Sample
getClientCountForInfo(info)
Gets the count for all clients displaying the same additional information in the Clients page of Servoy Server Administration Console.
Parameters String info The additional client info string to search for.
Returns Number Number of clients
Sample
getClientProperty(name)
Sets a UI property.
Parameters Object name Name of the client property
Returns Object the property value for the given name/key, null of nothing was found
Sample
getClipboardString()
Gets a string from the clipboard, null if not a string or empty.
Returns String The string from the clipboard
Sample
getHostName()
Get the name of the localhost.
Returns String Name of the localhost
Sample
getIPAddress()
Get the clients' IP address.
Returns String IP address of the client
Sample
getLicenseNames()
Get the names of the used client licenses (as strings in array).
Returns Array Client licenses names
Sample
getLogger()
Get a JSLogger instance which offers an API for logging with arguments. Available logging levels are (in order): fatal, error, warn, info, debug and trace. If no loggerName is given to this method, it returns the default logger (LoggerFactory.getLogger(Debug.class)) NOTE: the default logging level of the the default logger is 'warn', so info, debug and trace events are not logged.
Returns JSLogger a new JSLogger instance
Sample
getLogger(loggerName)
Get a JSLogger instance which offers an API for logging with arguments. Available logging levels are (in order): fatal, error, warn, info, debug and trace. The argument should be the name of a logger that is configured in myServoyInstallationDir/application_server/log4j.xml. A new logger can be configured in log4j.xml by adding the following line:
Parameters String loggerName the name of the logger, as configured in log4j.xml
Returns JSLogger a new JSLogger instance
Sample
getMediaURL(mediaName)
Get the media url that can be used to server a media in NGClient.
Parameters String mediaName Name of the media
Returns String
Sample
getOSName()
Returns the name of the operating system of the client. In Smart Client this will return os.name system property. In Web/NG Client will return "OSFamily majorVersion.minorVersion".
Returns String Name of the operating system of the client
Sample
getScreenHeight()
Get the screen height in pixels.
Returns Number Screen height
Sample
getScreenWidth()
Get the screen width in pixels.
Returns Number Screen width
Sample
getServerTimeStamp()
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.
Returns Date Server time
Sample
getServerURL()
Gets the HTTP server url.
This url will end with a / so don't append to this server url something that starts with a / again because RFC 3986 says that the path of a url (the part after the domain[:poort]) can not start with 2 slashes.
Returns String HTTP server URL
Sample
getServerUUID()
Get the uuid from this server instance (the same value that is shown on the admin page)
Returns String
Sample
getSolutionName()
Returns the name of the current solution.
Returns String Current solution name
Sample
getSolutionRelease()
Get the solution release number.
Returns Number Current solution release number
Sample
getStartupArguments()
Get the parameters which are provided by startup. It returns an array with 2 elements, a string that is the startup argument and a map containing all named startup arguments, or null if there is no argument passed
Returns Array Array with 2 elements, a string that is the startup argument and a map containing all named startup arguments, or null if there is no argument passed
Sample
getTimeStamp()
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.
Returns Date Current time at the client
Sample
getUUID()
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.
Returns UUID The new UUID object
Sample
getUUID(byteArray)
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.
Parameters Array byteArray Byte array representing an uuid
Returns UUID The new UUID object
Sample
getUUID(uuidString)
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.
Parameters String uuidString String representing an uuid
Returns UUID The new UUID object
Sample
getUserProperty(name)
Get a persistent user property.
In NGClient this is stored in the locale storage of the browser, so it will be persisted over restarts as long as the user didn't clear the data.
Parameters String name Name of the property
Returns String Property value
Sample
getUserPropertyNames()
Get all persistent user property names.
Returns Array Array of all user property names
Sample
getValueListArray(name)
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.
Parameters String name The name of the valuelist
Returns Array Named array for the valuelist
Sample
getValueListDisplayValue(name, realValue)
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.
Parameters String name Name of the valuelist Object realValue Real value of the valuelist
Returns Object Display value of the real value from the valuelist
Sample
getValueListItems(name)
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.
Parameters String name Name of the valuelist
Returns JSDataSet DataSet with valuelist's display values and real values
Sample
getValueListNames()
Get all the valuelist names as array.
Returns Array Array with all valuelist names
Sample
getVersion()
Returns the application version.
Returns String Application version
Sample
getVersionInfo()
Get the full version information of this solution and all its modules. This will return an object that is a map of Name(Sting)->Version(String) of the solution and all its modules.
Returns Object Name->Version map object.
Sample
getWindow()
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.
Returns JSWindow the main application JSWindow.
Sample
getWindow(name)
Get a window by window name. When not supplying a name, the main application window is grabbed.
Parameters String name the name of the window. If not specified, the main application JSWindow will be returned.
Returns JSWindow the JSWindow with the specified name, or null if no such window exists.
Sample
isInDeveloper()
Returns true if the solution is running in the developer.
Returns Boolean Boolean (true) if the solution is running in the developer, (false) otherwise
Sample
output(msg)
Output something on the out stream. (if running in debugger view output console tab)
Parameters Object msg Object to send to output stream
Returns void
Sample
output(msg, level)
Output something on the out stream. (if running in debugger view output console tab)
Parameters Object msg Object to send to output stream Number level the log level where it should log to.
Returns void
Sample
overrideStyle(originalStyleName, newStyleName)
Overrides one style with another. In NGClient, it overrides the original stylesheet media defined on a solution with another media.
Parameters String originalStyleName Name of the style to override String newStyleName Name of the new style
Returns void
Sample
putClientProperty(name, value)
Sets a UI property.
Parameters Object name Name of the client property Object value New value of the client property
Returns Boolean Boolean (true) if the client property was set with the new value
Sample
refreshGlobalMethodValueList(element)
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.
Parameters Object element form element
Returns Boolean boolean indicating if valuelist was refreshed
Sample
refreshGlobalMethodValueList(element, propertyName)
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.
Parameters Object element form element String propertyName name of property from the spec
Returns Boolean boolean indicating if valuelist was refreshed
Sample
removeAllClientInfo()
Removes all names given to the client via the admin page.
Returns void
Sample
removeAllUserProperties()
Removes all user properties.
Returns void
Sample
removeClientInfo(info)
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.
Parameters String info A line of text to be removed from the client information on behalf of the running Servoy client.
Returns Boolean boolean indicator if info was removed successfully
Sample
removeUserProperty(name)
Removes a user property.
Parameters String name Name of the user property
Returns void
Sample
setClipboardContent(string)
Sets a string object in the clipboard.
Parameters Object string New content of the clipboard
Returns void
Sample
setUserProperty(name, value)
Sets a user property for this client: In NGClient this is stored in the locale storage of the browser, so it will be persisted over restarts as long as the user didn't clear the data.
For headless clients(including Batch Processors and Authentication clients) the user property is stored in memory and will be lost upon client restart.
For Web Client the user property will be stored in a persistent cookie
For Smart Client it will be stored in a properties file on the client machine.
Parameters String name Name of the user property String value New value of the user property
Returns void
Sample
setValueListItems(name, dataset)
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.
Parameters String name Name of the valuelist JSDataSet dataset Dataset with display/real values
Returns void
Sample
setValueListItems(name, dataset, autoconvert)
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.
Parameters String name Name of the valuelist JSDataSet dataset Dataset with display/real values Boolean autoconvert Boolean (true) if display values and return values should be converted to numbers
Returns void
Sample
setValueListItems(name, displayValues)
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.
Parameters String name Name of the valuelist Array displayValues Display values array
Returns void
Sample
setValueListItems(name, displayValues, autoconvert)
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.
Parameters String name Name of the valuelist Array displayValues Display values array Boolean autoconvert Boolean (true) if display values and return values should be converted to numbers
Returns void
Sample
setValueListItems(name, displayValues, realValues)
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.
Parameters String name Name of the valuelist Array displayValues Display values array Array realValues Real values array
Returns void
Sample
setValueListItems(name, displayValues, realValues, autoconvert)
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.
Parameters String name ; Array displayValues Display values array Array realValues Real values array Boolean autoconvert Boolean (true) if display values and return values should be converted to numbers
Returns void
Sample
showForm(form)
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.
Parameters Object form Form object or name
Returns void
Sample
showURL(url)
Shows an URL in a browser.
Parameters String url URL to show
Returns Boolean Boolean (true) if URL was shown
Sample
showURL(url, browserTarget)
Shows an URL in a browser.
Parameters String url URL to show String browserTarget Target frame or named dialog/window
Returns Boolean Boolean (true) if URL was shown
Sample
showURL(url, browserTarget, timeout)
Shows an URL in a browser.
Parameters String url URL to show String browserTarget Target frame or named dialog/window Number timeout A timeout in seconds when the url should be shown
Returns Boolean Boolean (true) if URL was shown
Sample
showURL(url, browserTarget, browserTargetOptions)
Shows an URL in a browser.
Parameters String url URL to show String browserTarget Target frame or named dialog/window String browserTargetOptions Dialog options used when a dialog is specified / a timeout in seconds when the url should be shown
Returns Boolean Boolean (true) if URL was shown
Sample
showURL(url, browserTarget, browserTargetOptions, timeout)
Shows an URL in a browser.
Parameters String url URL to show String browserTarget Target frame or named dialog/window String browserTargetOptions Dialog options used when a dialog is specified / a timeout in seconds when the url should be shown Number timeout A timeout in seconds when the url should be shown
Returns Boolean Boolean (true) if URL was shown
Sample
sleep(ms)
Sleep for specified time (in milliseconds).
Parameters Number ms Sleep time in milliseconds
Returns void
Sample
updateUI()
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.
Returns void
Sample
updateUI(milliseconds)
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.
Parameters Number milliseconds How long the update should take in milliseconds
Returns void
Sample
Last updated