Script editors
Some of the editors described here are only available in Expert mode. You can find out how to enable this mode here.
Click here for general information about scripting in Intrexx.
JavaScript editor
You can access the JavaScript editor in the "Applications" module via the main menu "Edit / Edit script" or by pressing the F12 key directly via the workspace. The editor can also be accessed in the properties of elements and pages on the "Script" tab.
The JavaScript written here is saved by clicking on "OK". Afterwards, the script can be assigned to an event. Once the script has been published and the event occurs, for example through a user action in the browser, the script is executed.
"Edit" menu
The "Edit" menu in the editor provides the following functions. More information about the functions not described is available here.
Insert
Displays a list of all edit and view elements on the current page at the current cursor position. If text is highlighted, it will be replaced by the insertion. The list of elements can also be accessed by right-clicking at the desired position in the editor workspace. Select the element that is to be used in the script. The following programming code will then be inserted into the script editor automatically:
getElement("<GUID of the element>")
Create your references to the HTML object with the syntax
var <myElement> = getElement("<GUID of the element>");
Comment/Uncomment block
Inserts the characters "//" at the current cursor position in the editor.
Search in library
Jumps to the search field on the "Libraries" tab.
Search function
Jumps to the search field on the "Functions" tab.
Insert JSDoc
Opens a list of JSDoc tags at the current cursor position. JSDoc is intended to document functions. The following JSDoc tags are supported:
-
@author
-
@deprecated
-
@description
-
@example
-
@param
-
@private
-
@public
-
@returns
-
@throws
-
version
Select the desired tag and place it in a comment block. With "New JSDoc comment block" a complete paragraph with the author, description and version is inserted in the script.
If a function, which contains JSDoc tags, is selected on the "Functions" tab, the corresponding information is displayed at the bottom right.
"View" menu
Click here for more information.
"Functions" tab
The "Functions" area lists all JavaScript functions that are written on the editor workspace.
Search
You can search for specific functions here.
Reset filter
Click on this button to clear the search field.
Sort
Changes the alphabetical sorting of the function names between ascending and descending.
Link with editor
The cursor is moved to the beginning of the currently selected function.
Documentation
If JSDocs have been defined for the function, they will be shown here.
"Application structure" tab
Click here for more information about this area.
"Libraries" tab
Click here for more information about this area.
Groovy script editor
You can access the Groovy script editor in processes in the properties dialog of the "Groovy event handler", "Groovy action" and "Groovy condition" elements on the "Script" tab. You can also find it in the properties of applications and application pages, where you can create handler definitions on the "Handler" tab. You will also find it in the "Integration" module for data transfer, where you have the option of controlling the transfer via Groovy script.
With the Groovy script editor, you can expand the functionality of Intrexx. The script written here is saved by clicking OK and executed accordingly in processes, applications or during a data transfer.
"Edit" menu
The "Edit" menu in the editor provides the following functions. More information about the functions not described is available here.
Comment/Uncomment block
Inserts the characters "//" at the current cursor position in the editor.
Search in library
Jumps to the search field on the "Libraries" tab.
File history
Opens a dialog where you can access the versioning of the Groovy script file.
"View" menu
Click here for more information.
"Application structure" tab
Click here for more information about this area.
"Libraries" tab
Click here for more information about this area.
Velocity editor
Velocity can be written using the "VTL include" application element, for example. The script written in the Velocity Editor is saved by clicking on "OK" and executed accordingly.
"Edit" menu
The "Edit" menu in the editor provides the following functions. More information about the functions not described is available here.
Comment/Uncomment block
Inserts the characters "##" at the current cursor position in the editor.
Search in library
Jumps to the search field on the "Libraries" tab.
Insert final line break on exit
Normally, a line break is added at the end of the code.
"View" menu
Click here for more information.
"Application structure" tab
Click here for more information about this area.
"Libraries" tab
Click here for more information about this area.
Stylesheet editor
You can access the stylesheet editor in the "Design" module via the main menu "Edit / Edit stylesheet". The CSS of the layout can be changed here. All changes are applied by clicking on "OK" and take effect when the layout is published.
"Edit" and "View"
Click here for more information about these menus in the editor.
Formula editor
Calculations can be performed with this editor and the result is displayed in the corresponding element. Here you will find a tips & tricks article on the topic.
"Edit" menu
The "Edit" menu in the editor provides the following functions. More information about the functions not described is available here.
Insert value
Displays all application objects that can provide the script with a value. When you select an object, its GUID will be added to the editor at the current cursor position.
Use auto completion
Formulae can be selected in a tooltip here. If, for example, you have entered the term "sum" in the editor and use this menu, formulae that begin with "sum" will be suggested. If a parameter keyword is selected in a formula, the context menu is filtered by the respective parameter type. Click here for more information.
Show metadata
If a GUID or a control name is selected in the script, you can view more information about this in a tooltip - provided the GUID or control name is known.
Search in library
Jumps to the search field on the "Libraries" tab.
Undo / Redo
Restores the step performed before the last change or repeats the current step.
"View" menu
Click here for more information.
"Libraries" tab
Click here for more information about this area.
"Application structure" tab
Click here for more information about this area.
XML editor
Click here for more information about this tab.
Filter editor
Click here for more information about this tab.
"Libraries" tab
The following editors have this tab:
User-defined libraries can also be created here for each script language and for formulae. The Intrexx standard libraries (included with Intrexx) provide many useful functions. A link to the description of each library is below:
You can search through the libraries at the top of the area. "Reset filter " clears the search field.
Create your own libraries
In addition to the Intrexx standard library, you have the option of creating any number of your own libraries directly in the editor.
To do this, select the top entry "Libraries" and select the context menu "New / Insert library".
File name
The file name of the library can be entered here. Click on "OK".
Edit
The title, description (also multilingual) and a link to relevant content on the web can be entered here. If you confirm with "OK", the library is created. You will also find this dialog when you create categories or templates within a library.
The underlying file will be saved on the client and is not removed by an Intrexx update. Normally, the files can be found in the following directories:
-
Installation directory/client/cfg/templates/ECMAScript/custom/<filename>.xml
-
Installation directory/client/cfg/templates/formula/custom/<filename>.xml
-
Installation directory/client/cfg/templates/groovy/custom/<filename>.xml
-
Installation directory/client/cfg/templates/groovy/custom/<filename>.xml
If it was installed on a Windows computer within C:\Program Files, the files of the default Intrexx instance can be found in the following directories:
-
C:/ProgramData/intrexxclient<version>/cfg/templates/ECMAScript/custom/<library name>.xml
-
C:/ProgramData/intrexxclient<version>/cfg/templates/formula/custom/<library name>.xml
-
C:/ProgramData/intrexxclient<version>/cfg/templates/groovy/custom/<library name>.xml
-
C:/ProgramData/intrexxclient<version>/cfg/templates/velocity/custom/<library name>.xml
If it was installed on a Windows computer within C:\Program Files, the files of a custom Intrexx instance can be found in the following directories:
-
C:/ProgramData/intrexxclient<version>_<instance>/cfg/templates/ECMAScript/custom/library name>.xml
-
C:/ProgramData/intrexxclient<version>_<instance>/cfg/templates/formula/custom/<library name>.xml
-
C:/ProgramData/intrexxclient<version>_<instance>/cfg/templates/groovy/custom/<library name>.xml
-
C:/ProgramData/intrexxclient<version>_<instance>/cfg/templates/velocity/custom/<library name>.xml
Context menu: "New / Insert category"
If you select your new library, you can create new categories with this context menu item to help structure your library content. A dialog will open where the category can be provided with a title, description and a link to relevant online content. The category is created when you click on "OK".
Context menu: "New / Insert template"
Opens a dialog where the function, which you want to add to your library category, can be entered and saved as a template.
Additional functions in the context menu
Edit
Opens the properties dialog of custom libraries, categories or templates, if these are selected on the "Libraries" tab.
Copy / Paste / Delete
Custom libraries, categories and templates are copied, pasted or deleted, respectively. Content in Intrexx standard libraries can only be copied.
Show description
Shows the description of the element currently selected.
Open link
Opens the target page that is specified as the element currently selected.
Sort by name
Sorts custom libraries, categories or templates by name.
Expand all / Collapse all
Expands/collapses all subordinate elements.
Export / Import library
Exports the library as an XML file / Imports a previously exported library.
Insert into script
Inserts the currently selected function into the script at the cursor's current position.
Details
If a library is selected, this option opens a dialog that displays the name and path to the script file.
Link, Edit, Description
On the "Libraries" tab, you will find the following buttons if a function or method is selected:
Link
Opens the website, that is specified as the link, in the browser.
Edit
Opens the properties dialog of the currently selected element.
Show description
Displays the description of the currently selected element.
The Intrexx standard library cannot be modified. Therefore, the properties dialog for editing the title, description and link of library elements is not available. Creating, editing, deleting and importing custom libraries is deactivated if the current user does not have write access to the corresponding folder that contains the library.
"Application structure" tab
On this tab, the application structure will be represented. If an element is highlighted in the tree structure, the area below will show various properties, like the GUID or name of the element. By clicking on the symbol, the corresponding value will be inserted in the script.
"Edit" menu
Save intermediately
The code will be saved locally with this command. If the editor is closed with "Cancel", all changes that have been cached will be applied.
Undo
Undo the most recent step while editing the script.
Redo
Repeats the most recent action.
Search
Opens a dialog where expressions can be searched for and replaced in the script.
Delete line
Deletes the line where the cursor is located from the script.
Go to line
Opens a dialog where a line number can be entered for selection in the editor.
Enter the desired line here and then click on "OK".
Syntax check
The syntax check identifies incomplete pairs of parentheses and other potential errors in the script.
Remove trailing space on exit
If this command is activated, extra spaces and tabs at the ends of lines script will be deleted when you exit the editor.
"View" menu
Show functions
If an editor contains tabs, e.g. the JavaScript editor contains the tabs "Functions", "Libraries" and "Application structure", these can be shown or hidden here in the upper area of the "View" menu.
Restore default view
Restores the original view of the editor, after the Portal Manager has been restarted.
Full screen
Maximizes the editor.
Options
Opens a dialog where the font type and size can be defined.
Font
The font type and size can be set in the editor here.
JavaScript editor: Set marker
When an application is opened, JavaScript is searched for comments containing the character string //FIXME or //TODO. The expressions FIXME and TODO have to be placed directly after the comment string //. The symbols for //FIXME and //TODO comments are also shown to the left of the corresponding line in the editor.
Hits of //FIXME comments will be noted in the "Problems" area with this icon in the left-hand column in the editor. Hits of //FIXME comments will be noted with this icon. If you double-click on a hit, the editor will open.
Status line
The status line of the editor shows the cursor position with line and column number, possible errors with line number and the number of tasks with an indication of the line number of the first task.
Integrate external editors
The editor settings can be edited via the main menu "Extras / Options" item under the "General" node.
Instead of the internal Intrexx editor, external editors can also be used for JavaScript, Groovy and Velocity. To do so, select the "External editor" option here. Click on "Select" to save the path to the external editor.
If a file (such as the JavaScript file for the application) is opened in an external editor, the script button cannot be used as long as the external editor is running. The external editor works on a temporary file, which is only applied when the editor is closed. Please do not change the temporary file name. Use the Save function in the external editor.
Parameters for the paths for external editors
Notepad++
"\notepad++.exe" -multiInst ${file}
Editplus
"\editplus.exe" ${file}
gedit
"/usr/bin/gedit" --new-window ${file}
Entering the parameter ${file} is usually not required; however, it can be entered if the external editor expects or supports additional parameters after the file name. The file path must be enclosed in quotation marks, the parameters follow thereafter. With the setting "Field suggestion list in Groovy editor inserts ValueHolder" the Field suggestion list in the Groovy editor inserts "g_record["GUID"]". If the setting is not enabled, the Field suggestion list inserts "g_record["GUID"].value".