In Appway, the Events and Actions framework allows users to interact with Screen Components and with entire Screens. For each Event, a series of Actions can be executed. For example, for the onclick Event on the Button Screen Component, we can trigger the execution of a Script Action.
Events and Actions in Appway:
- Screen Components can listen to their own Events, as well as to other Screen Component Events.
- Screen Components can listen to Events generated by the entire Screen.
- When an Event is triggered, defined Actions for all the listeners are executed.
- For Screen Events (such as resizing), Actions defined on the listener components are triggered.

Events and Actions in Appway
Screen Components can listen to their own Events, as well as to other Screen Component Events. The component that is listened to is referenced through its HTML Id.
Following is a list of Screen Component Events:
- onchange — The event is triggered when the selected option in the component itself or the value associated to the component change.
- onblur — The event is triggered when the focus is no longer on the component (e.g. when you leave a field).
- onfocus — The event is triggered when the focus is set on the component.
- onkeyup — The event is triggered whenever you release a key.
- onenterkey — The event is triggered when you press the Enter key (e.g. in a Password Field).
- oncreate — The event is triggered when you click on an element.
- onclick — The event is triggered when you click on a component (e.g. a Button).
- onmousedown — The event is triggered when you press the mouse button over the component.
- onmouseup — The event is triggered when you release the mouse button from the component.
- onmouseout — The event is triggered when you move the mouse pointer out of the component.
- onmouseover — The event is triggered when you move the mouse pointer onto the component.
- onslide — For the Slider Screen Component, the event is triggered when you are sliding.
- onstart — For the Slider Screen Component, the event is triggered when you start sliding.
- onstop — For the Slider Screen Component, the event is triggered when you stop sliding.
- onsearch (available for the Search Field Screen Component) — The event is triggered when you write something in a search field.
- ontabclick (available for the Adaptive Tab Screen Component) — The event is triggered when you click on a tab.
Screen Components can listen to Events generated by the entire Screen.
Following is a list of Screen Events:
- onrender — The triggering event is the rendering of the screen.
- onresize — The triggering event is the resizing of the browser window.
- onscroll — The triggering event is a scrolling action on the page.
- onload — The event is triggered when all the resources are loaded.
- onready — The event is triggered when everything is visible.
Actions can be grouped in three categories:
- Server-Side Actions – require a submit of the Screen to the server in order to execute the Actions.
- Client-Side Actions – are executed without a submit of the Screen.
- Logic Actions – allow setting If/Then/Else Logic Types for triggering Actions.
It is possible to define multiple Actions for the same Event on a Screen Component. Actions of the same category get executed in the order they are defined in the component. However, consider that all Client-Side Actions are executed before Server-Side Actions.
For example, if the user triggers an Event on a component, all Client-Side Actions for this Event get executed (if any). Then, if there is at least one Server-Side Action registered for this Event, the Screen is submitted to the server, which executes the Server-Side Actions registered for the current Event and the triggering component.
The different types of Actions can easily be distinguished according to their icons in the editor. Server-side Actions have a cloud icon; Client-side actions have a desktop-screen icon, while Logic Actions have a workflow icon.

In Studio, all the Screen Components that allow Actions display an 'A' next to their names. Click on it to go to the Actions tab and set the Screen Component's Action properties.

Common Action properties are:
- Name – Display name of this action (used only in the Screen Editor).
Some action properties are dynamic properties. Instead of specifying a static value, an Expression can be entered. The Expression is evaluated at runtime. Dynamic properties of Server-Side Actions get evaluated when the action is executed. Dynamic properties of Client-Side Actions have to be pre-evaluated when the Screen is rendered.
Before a Server-Side Action can be executed, the Screen has to be submitted to the server. If not explicitly disabled, the server goes through all Screen Life Cycle Phases from Update to Validate, and Process. By default, events get processed in the third Phase called Process. Therefore, this is also the Phase where Actions get executed.
Common Server-Side Action properties are:
- Phase – The Screen Life Cycle phase in which the action should get executed. The default value is Process. Actions are executed before the other activities of a Phase.
- Condition – An Expression used to decide at runtime if the Action should get executed. If there is no Condition, the Action is executed. This Expression can be used to put a veto on the execution of the Action.
- Ignore Errors – Whether the Action should get executed if there have been Validation Errors (i.e. the user's input did not validate). By default, Server-Side Actions do not get executed if there have been errors in previous phases.
The Script Action is used to executed an arbitrary script on the server.
Script Action properties are:
- Script – Expression Script to be executed.
A Reload Screen action can be used to reload the Screen, going through the Screen Life Cycle phases.
A Process Action is used to navigate to the next Screen of the current Process. When a Process Action is executed, the Screen Life Cycle is not interrupted. Instead, the server remembers this Action and continues executing other Actions (if any). After processing all actions and phases, it triggers the Process Engine in order to evaluate which Screen has to be shown next.
There can be different Components on the screen that potentially trigger a Process Action. A typical example is a screen with Next and Back Buttons to navigate between screens. In order to distinguish between the different Event Sources (Buttons), the Process Action can be used to set a variable to a certain value. The variable is usually called $action and has to be of the type String. In order for this to work, this variable has to be defined in a higher scope (e.g. the Process). This way, the Process Action on the Next Button could set the variable $action to next, and the Process Action on the Back button could set the variable $action to back.
Process Action properties are:
- Action Variable – The name of the variable that holds the Action Value. The default value is $action.
- Action Value – The value stored in the Action Variable (String).
Consider that the Process Action may not get executed if there have been validation errors. If the Action is to be executed despite errors (e.g. for the implementation of a Cancel button which has to work regardless of what the user entered into other Components), either set the Ignore Error option on the Action or add a Skip Phase Action to skip the Update and Validate phases.
URL Action is used to navigate to a URL, usually outside of this web application. The effect of the URL Action is deferred until all actions and phases have been processed.
URL Action properties are:
- URL – The URL to navigate to.
- Logout – If the current user's session should get invalidated.
The placeholder that can be used within the URL is:
- { CONTEXT_PATH }: this is replaced with the web application's context path.
The URL Action can be used to implement a Logout procedure. Follow these steps:
- Create a Button or Link with a Logout Action.
- Enter the following URL:
/workspace/public or /workspace/internal. - Select the Logout option.
Client-Side Actions are executed on the client without a submit to the server. Client-Side Actions are implemented in Java Script. While properties of Server-Side Actions are evaluated if the Action is executed, properties of Client-Side Actions have to be pre-evaluated when the Component holding the Action is rendered. The Action's Java Script code is then integrated into the Screen's HTML output. Therefore, Client-Side Actions can usually not "react" to data entered on the current Screen.
There are a couple of actions used to display content in a new or existing window. These actions are called Window Actions and start with the word Display in the name: Display Generated PDF, Display Link, Display Resource etc.
Common Window Action properties are:
- Target (Window Name) – The name of the target window (or frame). If no value is specified, the content is displayed in the current window. Use the value _blank to display the content in a new window. Characters allowed: a-z, A-Z, 0-9 and _
- Window Width – Window width (only if a new window has to be opened).
- Window Height – Window height (only if a new window has to be opened).
The Window Width and Window Height properties have no effect if no target is specified, if the target window is already open or if the target denotes a frame.
The Action Timer Action stops the execution of an Action Timer Screen Component. This allows having an Action on a Screen that is triggered automatically, but it can also be turned off or on without the need of writing custom code.
Action Timer Action properties are:
- Enabled – enter a condition that disables this Action dynamically if it returns
false.
- Server-side Actions – the condition is evaluated before the action is executed. If it returns
false, the action is not executed. - Client-side Actions – the condition is evaluated at render time. If it returns
false, the action's code is not added to the client-side event handler.
- Action Timer – enter the name of the Action Timer Screen Component you want to stop.
The Ajax Update Area Action is used to redraw an Ajax Update Area Screen Component.
Although the Ajax Update Area Action is marked as a client-side action, it actually involves an interaction with the Server. Even though the user does not perceive a full page reload, the full page is nevertheless submitted to the server.
Ajax Update Area Action properties are:
- HTML Ids – A comma-delimited list of HTML IDs for Ajax Update Areas. Each given Area is updated. Leave the property empty to update all Areas.
Note on the HTML Id property. Consider that the HTML ID must be unique in any HTML page. Non-unique HTML IDs in a page may cause unexpected behavior in your Screens.
- Async – If checked, the update is executed asynchronously. This means that the use can continue working on the Screen while the Server re-renders and updates the Ajax Update Area. If you want to force the user to wait until the Screen is updated, uncheck this property.
- JavaScript Callback Code – JavaScript code entered here is executed after the Ajax Update Area has been updated. You can use this to remove any "please wait" signs you may have shown before redrawing the Ajax Update Area.
Typically, you will want to have a Skip Phase Action before each Ajax Update Area Action, skipping the Validation step. Otherwise, validation errors can appear on the Screen each time the Ajax Update Area is redrawn.
This Action displays a blocking overlay that prevents users from interacting with the Screen
Block User properties are:
- Enabled – enter a condition that disables this Action dynamically if it returns
false.
- Server-side Actions – the condition is evaluated before the action is executed. If it returns
false, the action is not executed. - Client-side Actions – the condition is evaluated at render time. If it returns
false, the action's code is not added to the client-side event handler.
- Timeout – time (in ms) before the overlay is displayed.
- Text – message shown on the overlay (e.g. 'Please, wait').
- Throbber / Image – set the type and size of the throbber shown on the overlay.
- Close after Ajax Update – disables the Action (and closes the overlay) once the following Ajax Update Area Action is finished.
This Action closes the current window or tab.
Close Window property:
- Enabled – enter a condition that disables this Action dynamically if it returns
false.
- Server-side Actions – the condition is evaluated before the action is executed. If it returns
false, the action is not executed. - Client-side Actions – the condition is evaluated at render time. If it returns
false, the action's code is not added to the client-side event handler.
This Action generates a Javascript Confirm box. The user needs to click either OK (returns true) or Cancel (returns false) to proceed.
Important note: The Confirm Action acts as a gate for subsequent actions. If the user clicks on Cancel, no other action is executed by the action list manager, meaning that all previously applied actions are not rolled back. As an example, if you use a Confirm Action to act on a dropdown list when changing the dropdown value e.g. from "a" to "b", when the user clicks on Cancel, the new value "b" is still displayed. This is the intended behavior of the Confirm Action.
Confirm properties:
- Enabled – enter a condition that disables this Action dynamically if it returns
false.
- Server-side Actions – the condition is evaluated before the action is executed. If it returns
false, the action is not executed. - Client-side Actions – the condition is evaluated at render time. If it returns
false, the action's code is not added to the client-side event handler.
- Message – Message displayed on the Confirm box (e.g. Do you want to continue?)
The Display Entry Point Action is used to integrate Entry Points defined in Packages into solutions. When the Action is triggered based on events occurring on the Screen or with a Screen Component, it calls the defined Package Entry Point.
The available properties are:
- Package / Entry Point – Define a Package and which Entry Point of the Package the Action opens.
Note: Only Packages on which the current Package has a dependency defined can be selected. Set dependencies on the
Package Properties tab, in the Package Dependencies section.
- Internal – If checked,
/internal is added to the URL between the context path and the servlet path. This way, an authenticated user can access the URL directly, while an unauthenticated user is redirected to the login page first.
Please, be aware this is
not a security feature to prevent unauthorized users to access your Entry Point. For more information, see the
Authentication and Authorization article.
- Query Parameters – A query string which is appended to the Entry Point URL. (
parameter1=value1¶meter2=value2) - Version Filter – The Version Filter used to retrieve the Entry Point version and the version of the Business Object associated with the Entry Point (Process, Screen, or Script Function):
- Same Version (Inherited) – Uses the same Filter as the Screen the user is currently in.
- Newest committed Version – Uses the latest committed version of the linked Entry Point.
Note: If the Business Object associated with the Entry Point is a Process, then the Version Filter used to select the Entry Point and the Process version is also used at runtime during execution of the Process Instance.
This action can be used to display a PDF generated by the PDF Render Service.
Note that the action itself does NOT generate the PDF.
Display Generated PDF Action properties are:
- Configuration – An Expression that evaluates to a
PdfRenderConfiguration object (usually a variable like $configuration)
The Display Link Action shows an arbitrary URL.
Display Link Action properties are:
- URL – The URL to show in the window (or frame).
Tip: A placeholder can be used within the URL and gets replaced at runtime by the web application context path.
The Display Resource Action shows a resource in a new window or in a frame. This Action can be used to display PDF, Word or other documents uploaded and registered as Resource Business Objects.
Display Resource Action properties are:
- Resource – The resource to display. This is a dynamic property. If an Expression is specified, it is expected to return the id of an existing Resource.
The Display Screen Action is used to link to a Screen.
Display Screen Action properties are:
- Screen – Screen opened by the Action.
- Internal – If checked,
/internal is added to the URL between the context path and the servlet path. This way, an authenticated user can access the URL directly, while an unauthenticated user is redirected to the login page first.
Please, be aware this is
not a security feature to prevent unauthorized users to access your Screen. For more information, see the
Authentication and Authorization article.
- Language – The language used to render the linked Screen.
- Path Parameters – Variable values sent to the Screen as part of the Screen's path (
parameter1/value1/parameter2/value2/). - Query Parameters – Variable values sent to the Screen as part of its query string (
parameter1=value1¶meter2=value2). - Version Filter – The Version Filter used to get the Screen's version:
- Same Version (Inherited) – Uses the same Filter as the Screen the user is currently in.
- Newest Committed Version (Timestamp) – Uses the latest committed version of the linked Screen.
The Display Process Action is used to trigger a Process and create a new Process Instance.
Display Process Action properties are:
- Process – The Process to start. This is a dynamic property. If an Expression is entered, it is expected to return the ID of an existing Process.
- Internal – If checked,
/internal is added to the URL between the context path and the servlet path. For example, for the Process 'AOP', the URL becomes /internal/process/AOP. This way, an authenticated user can access the URL directly, while an unauthenticated user is redirected to the login page first.
Important! This is
not a security feature that prevents unauthorized users from accessing your Process. For more information, see the
Authentication and Authorization article.
- Complete Action – The action to perform when the Process ends. Possible values are: Show Portal, Show URL... and Close Window.
- Complete Action Parameter – If Complete Action is set to Show URL..., specify the URL here.
- Variable Assignments – Variable Assignments are used to initialize the Process variables and must be supplied in the form of query parameters (
name1=value1&name2=value2&... ), where the parameter names correspond with the variable names within the Process Variable Definitions and the parameter values contain Expressions. Variable Assignments is a dynamic property. Therefore, it is constructed at runtime.
The parameter values are expected to be valid Expressions. Therefore constant values of the type
String have to be quoted. Special characters might have to be encoded using the
ENCODEURL function. Examples:
dossierId='D012911'date=NOW()&sortOrder=2&displayDeleted=false-
JOIN("employeeId='",ENCODEURL($employeeId),"'")
This action is similar to Display Process. But instead of a Process Instance, a Sub-Process is started and a new Sub-Process Instance is created. After the Sub-Process has been started, the Sub-Process Instance is scanned for Workitems assigned to the current user. If there is at least one Workitem of the type Sub-Process, the first Screen of this Sub-Process is displayed.
Display Sub-Process Action properties are:
- Process – The Process to start.
- Internal – If checked,
/internal is added to the URL between the context path and the servlet path. This way, an authenticated user can access the URL directly, while an unauthenticated user is redirected to the login page first.
Important! This is
not a security feature that prevents unauthorized users from accessing your Process. For more information, see the
Authentication and Authorization article.
- Complete Action – The action to perform when the Process ends and no more Workitems of the type Sub-Process are assigned to the current user. Possible values are: Show Portal, Show URL... and Close Window.
- Complete Action Parameter – If Complete Action is set to Show URL..., specify the URL here.
- Variable Assignments – Variable Assignments are used to initialize the Sub-Process variables.
This action can be used to display a Workitem.
Display Workitem Action properties are:
This action can be used to execute arbitrary Java Script code.
Java Script Action properties are:
- Code – The Java Script code to execute
If the code contains syntax errors or semantical errors, other actions on the Component may not get executed.
The Skip Phase Action is used to tell the server to skip certain Screen Life Cycle phases if the next submit is executed.
Skip Phase Action properties are:
- Skip Update Phase – Whether to skip the Update Phase.
- Skip Validate Phase – Whether to skip the Validate Phase.
- Skip Process Phase – Whether to skip the Process Phase.
This Action can be used to add depth to a Screen. In fact, it allows stacking layout containers on different layers, each associated with a given level of depth. Moreover, the layout container can be set to stick to the border of the screen. This allows implementing features such as: sticky footers, sticky navigation links and buttons, or any other kind of component that sticks to the screen border.
Set Layer Action properties:
- Enabled – Enter a condition that disables this Action dynamically if it returns
false.
- Server-side Actions – The condition is evaluated before the action is executed. If it returns
false, the action is not executed. - Client-side Actions – The condition is evaluated at render time. If it returns
false, the action's code is not added to the client-side event handler.
- Context – The Position (see below) of the Screen Component is determined in relation to the selected element:
- Parent – The position of the Screen Component is relative to the parent layout container element.
- Screen – The position of the Screen Component is relative to the whole viewport.
- Static – This option is used to reset the original conditions after a Set Layer Action has been applied. In this case, the options selected in the Layer and Position properties have no influence.
- Layer – Determines the stack order of the Screen Component. Set the highest number (e.g. 2) for the component that you want to place in front compared to the other components on the back (e.g, 0 and 1)
- Position – Determines the position of the Screen Component on the Screen. The position can be set either dynamically, relative to the rendered screen, or statically, by setting the custom offset:
- For the dynamic setting, you can choose among a number of options (e.g., Top, Bottom, Fill Space and so on).
- For the static setting, chose the Custom option, and then set the exact position of the layout container by filling the Top, Right, Bottom, and Left fields.
This Action can be used to show or hide a given Layout Container. For instance, it can be used to selectively hide a sidebar when the resolution of the target device is not high enough.
Set Visibility Action properties:
- Operation – Determines whether the Screen Component is visible (Show), invisible (Hide) or changes from visible to invisible or viceversa (Toggle) when the event is triggered.
This Action can be used to animate a region of the Screen. For instance, the menu icon on the header can trigger a Slide action for the left sidebar, so that the sidebar can be hidden and then reappear from the same side when the button is clicked.
Slide Action properties are:
- Operation – Determines whether the Screen Component gets visible (Show), invisible (Hide) or changes from visible to invisible or viceversa (Toggle) when the event is triggered.
- Direction – Determines the sliding direction.
- Duration – Determines the duration of the operation (in ms).
This triggers an action that changes a Style Business Object on a component. For example, you can associate an onclick Event with a Button component to trigger a SetStyle Action for a Layout Container. Therefore, when you click on the button, the Style Business Object you selected is applied to the Layout Container.
Set Style Action properties:
- Style Id – Select the Style Business Object you want the Screen Component to switch to when the action is triggered.
This Action shows a component (for example, a Layout Container) as a popup. The configuration for this Action allows showing the popup as a full screen, or determine the popup position and transition mode.
Show as PopUp Action properties:
- Preferred Position – Position of the popup in relation with the Screen Component the Actions was set for (e.g. if if you set the Action for a Layout Container and select the Top option, the popup will open above the Layout Container). In this case, set the *HTML ID of Reference Component property.
Some restrictions may apply depending on the Screen layout.
- HTML ID of Reference Component – Enter the HTML ID of the Screen Component the Actions was set for if you want the popup to open next to it. If you leave this field empty, the popup opens next to the Screen Component triggering the event (e.g. a Button).
This Action is used to prevent the Actions placed below it from being executed.
Stop Action properties are:
- Enabled – enter a condition that disables this Action dynamically if it returns
false.
- Server-side Actions – the condition is evaluated before the action is executed. If it returns
false, the action is not executed. - Client-side Actions – the condition is evaluated at render time. If it returns
false, the action's code is not added to the client-side event handler.
You can select the If/ElseIf/Else options to set a Condition for triggering an Action. For example, you may want to execute a certain Action only if your screen is wider than 500 pixels.
Both Screen and Screen Component Events can trigger Logic Actions. The list of properties that can be exposed on the components can vary depending on the type of component.

List of Screen Events exposing properties

List of Screen Component Events exposing properties
There are three Logic Actions:
- If: it triggers the action if the condition is true.
- Else: it triggers the action if the condition is false.
- ElseIf: used in combination with an If condition, it triggers the action when the If condition is false and the ElseIf condition is true.
To add an Event, follow these steps:
- Select one of the following options, and then click the Add button:
- Component Event Source
- Screen Event Source
- If you selected a Component Event Source, click on the Component field and choose the component that triggers the event, for example the Button.
- A list of possible events for the selected component is displayed on the Event panel.
- Fill in the HTML Ids field with the Id(s) of the component(s) listened to, in this case the Button Id.
Note on the HTML Id property. Consider that the HTML Id must be unique in any HTML page. Non-unique HTML Ids in a page may cause unexpected behavior in your Screens.

To remove an Event Source, hover the mouse over the component and select the Delete icon.

In this example, you want to set an initial state for a certain component, for instance make it invisible from the start.
- Click on the Screen onrender event on the Event panel.
- From the Action dropdown list, select the Set Visibility option.
- From the Operation dropdown list, select the Hide option.

You have the possibility to set the same Logic Type for more than one Action. To do so, you can set a Flow Control Action:
- Select the If/ElseIf/Else from the Action dropdown list, and then click on the Add button.
- Drag the If/ElseIf/Else row above the previously created Actions. The Condition now applies to all the Actions below. For example, you can specify an If condition such as ‘If the screen is wider than 300 pixels’ to trigger all the Actions below.
You can have different logic Type for different groups of Actions, but you cannot nest a Logic Type inside another Logic Type (for example, you cannot have an If Logic Type hanging from another If Logic Type).
It is possible to define multiple Actions for the same Event on one Component. Actions get executed in the order they are defined in the Component.
There is one exception to this rule: the Client-Side Actions are always executed before the Server-Side Actions. Therefore, if the user triggers an Event on a Component, all Client-Side Actions for this Event (if any) get executed first. Then, if there is at least on Server-Side Action registered for this Event, the server executes it.