An overview of all JavaScript functions that can be used in the context of GUI controls can be found here: https://help.appducx.fabasoft.com/index.php?topic=doc/GUI-Controls-API/index.htm.
Attention: JavaScript functions not listed on that page are only for internal use.
In this chapter you can find examples for some of these functions.
In the following example you are going to create a control that allows calling an application. It demonstrates the usage of GetId, GetObject, GetUrl, GetElement, StartOverlayApp and a user-defined helper function.
Example |
app.ducx Object Model Language objmodel FSCCONTROLSAMPLE@1.3285 fields { class CtrlSampleString : BasicObject { // creates an instance of a control app.ducx User Interface Language userinterface FSCCONTROLSAMPLE@1.3285 // when reading or editing the FormCtrlSample form should be used // a form displaying the integer property layout { // a form that is used for the called application formpage CustomDataPage { dataset { layout { app.ducx Use Case Language usecases FSCCONTROLSAMPLE@1.3285 // call the application dialog CustomControlDataDialog { } rendercustomstring.js function jQueryFSCCONTROLSAMPLE_1_3285_CustomStringControl() this.OnLoad = function CustomStringControl_OnLoad() fscjq("#" + this.GetId("StartOverlayApp")).click(function() { // this function gets called when closing the overlay } |
You can click “Start Overlay App”. The overlay shows the passed parameters.
After clicking “Next” the callback function modifies the HTML and prints “Overlay Callback”.
In the following example you are going to create your own object list. It demonstrates the usage of GetInit, GetId, GetArgs, GetSymbolPath, GetValue, SetValue and Refresh.
Example |
app.ducx Object Model Language objmodel FSCCONTROLSAMPLE@1.3285 class CtrlSampleObjectList : BasicObject { // creates an instance of a control // provides initial data for the control app.ducx User Interface Language userinterface FSCCONTROLSAMPLE@1.3285 import COOSYSTEM@1.1; // when reading or editing the FormCtrlSample form should be used rendercustomobjectlist.js function jQueryFSCCONTROLSAMPLE_1_3285_CustomObjectListControl() |
You can add objects to the customized object list using “sourceobject”. Removing object from the list can be done with the “Remove” button.