Open view (Form designer)
Actions – Abstract
Opens a view to which form data, a reference to the ID of an entity or a Search or a suitable search restriction (see Restrictions) can be transferred, and optionally waits for a data object to be returned or the view to be closed.
See also: Open view (Action)
The Open view (Form designer) action opens a view to which form data, a reference to the ID of an entity or a Search or suitable search restriction (see Restrictions) can be transferred, and optionally waits for a data object to be returned or the view to be closed.
Depending on the type of input value, the type of view to be opened (detailed view, overview, combined view) and the parameterization, there are numerous variants for the use of Open view (Action), which are systematically explained in the 'Configuration' section.
If it is necessary to wait for the open view to close and, if necessary, process a return value from the view, a behaviour must be specified for the Execute behaviour after closed parameter that initiates the subsequent processes.
Views are Input forms, overviews (incl. Custom overviews), Portals, Dashboard or other views provided by the system (e.g. in the Administration menu item).
►NOTE◄
Alternatively, views can be opened in the context of Event handling or via Client workflow using the Open view (Action) event action.
Specific configuration options for Portals are supported by the otherwise similarly structured Open portal action or the Open portal (Action) event action.
Configuration
The configuration of the Open view (Action) covers a wide range of application scenarios and therefore offers numerous parameters. These are presented below in tabular form and grouped according to focus areas.
Selection of the view to be opened |
|
The view to be opened can be addressed in two different ways:
►NOTE◄ If the View or menu node name is handled in a variable way at runtime (e.g. via Calculate behaviour), only the second option is possible. The View or menu node name parameter itself does not interpret any calculation expressions. A view is only opened if:
Whether the following example values work as View or menu node names also depends in part on which Lobster_pro modules are licensed:
|
Static definition of the view to be opened The view name for the input form for Users is defined as static text:
Dynamic definition of the view to be opened The view name is constructed using a Calculation expression in a Calculate behaviour so that Open view (Action) opens an input form for Users or for Guest users depending on the value of a Check box element (here: $el(11)). The 'calculated' text section is highlighted in the following view names:
►IMPORTANT◄ The input value is only taken into account as a View or menu node name if there is no static text for the parameter itself.. |
If a view cannot be opened, no error (process exception) occurs so that subsequent actions and behaviours are executed. However, this does not apply to an optional follow-up process triggered by Execute behaviour after closed. This does not apply if no view is opened, because then no view is closed. How can I determine the view name and the menu node name? The view name and menu node name of a view that is already open can be determined by clicking on the ?-symbol at the top right of the window title while holding down the key combination STRG+ALT (or. CMD+ALT for Mac). In the context of an Bestellungen input form, this results in the following message:
(Text marking added subsequently) The first highlighted line defines the view name of a detail view (detailsWindow), i.e. addresses a data input form for Bestellungen. ►IMPORTANT◄ To open a view, do not use the shorthand notation from the line above, in which the associated namespace prefix appears instead of the full class name. The context entries with the wildcard symbol * are also not suitable for addressing the view. The second highlighted line defines the menu node name (order/orderDetails) for the same view, which corresponds to the menu path in the main menu ('Orders/order details'). ►NOTE◄ The menu node name does not appear here if a view was not opened via the main menu bar, but e.g. via Open view (Form designer) or by clicking on a function in the ribbon ('New' or 'Edit') in an overview. In this case, there is also no access to help topics (see Online help) that are linked to the menu node name. |
|
Data assignment for the view to be opened |
|
While in the context of an Open view (Action) event action, the 'form data' to be assigned for the view to be opened can be provided directly via a value configuration, in the context of the Open view (Form designer) action, one of the following alternatives for data assignment applies depending on the method for selecting the view to be opened (see above):
The effect of a data assignment depends on several factors:
|
|
The description for the following cases is based on the assumption that the Force load option is unchecked (default). |
|
|
|
If the Force load option is checked, both complex data objects and simple values are assigned directly to the open view, provided it is not a Search or 'Search restriction' (see above). |
|
When the Force load option is checked, a client object (as an example of a complex data object) can be assigned to a portal. If Force load is not checked, an attempt is otherwise made in this constellation to read the designated Data field (or the default id property) from the complex data object. If this access returns a return value of the Long type or can be converted into a Long value, this value is assigned to the id field in a specially created client object that is transferred to the view (here: portal). |
|
Data return from the view (optional) |
|
►IMPORTANT◄ The Open view (Action) event action can be used to pause event handling in the call context when a view is opened until the open view is closed or a maximum 'waiting time' expires. The Open view (Form designer) action does not support this procedure. The execution of subsequent actions within the calling behaviour cannot be stopped. Instead, a behaviour can be specified that is executed when the open view is closed. A maximum 'waiting time is not provided. The optional Execute behaviour after closed parameter specifies the behaviour that is to be executed when the open view is closed. No behaviour is selected by default. A data return from the open view can only trigger the Request close action, which can only be accessed in the context of a behaviour in a form. Data can therefore only be returned from a view that is a form ( input form, portal, dashboard) or contains a form (combined view). No return value can be transferred from a simple overview without a detail area. Nevertheless, a behaviour can be selected that is executed after the overview is closed. |
By default, the dropdown for the Execute behaviour after closed parameter only lists the behaviour names that are defined for the form element with the calling behaviour. To be able to select and execute a behaviour for another form element within the same form, the element in question must first be linked as a Target element for the Open view (Form designer) action. By default is is set as No target element linked. The target element link can be found – as usual – in the first place under the properties of the action. The editing mode for the link is activated with a mouse click.
|
Display behaviour of the view |
|
►NOTE◄ The Force load option does not affect the 'Display behaviour of the view' but the 'Data assignment for the view to be opened' (see above). |
|
If the Modal option is unchecked (default), the view should be opened as an independent view. The Only one instance option then determines whether the view is also opened if (at least) one instance of the view is already open non-modally – i.e. as an independent view. If the Modal option is checked, the view is displayed within the current view when it is opened. The Only one instance option is then ignored. Additional options also appear in the configuration:
|
|
Examples
Simple use case: Open the input form for the 'Owner' company account
In a data input form for any entity (here: 'Order'), a data input form with the detailed data of the relevant company account should be opened when clicking on the read-only Combobox element for 'Owner' (ownerId). The company account form should be opened as a full screen modal with a 'Back' button within the calling view.
Configuration:
The screenshot on the right shows the Editor view of a data input form for Orders in which the Combobox element for the 'Owner' (ownerId) field is selected. In the 'Properties' bar (right), the 'Behaviour' tab is selected, which shows a behaviour with the Behaviour name 'click':
|
|
►NOTE◄ By default, company accounts are maintained via a 'Combined view', in which the default data input form is used in conjunction with a data grid. A separate menu item for opening a data input form for company accounts therefore does not appear. A pure input form can still be opened directly via the view name de.lobster.scm.base.company::CompanyAccount|detailsWindow.
More complex use case: Open overview with first level children
In a data input form for Company accounts, a Button is provided that can be used to display 'First level children' as a list in a modally opened overview.
Configuration:
The following behaviour is configured for the 'First level children' Button with the Behaviour name 'childCompanies':
|
|
|
The screenshot on the right shows the configuration for the Client workflow:
►NOTE◄ This Simple property restriction is considered fulfilled if the ID of the entity in the parent view is contained in the list of IDs in the parentCompanies property. In this respect, the open view only lists the 'First level children'. |
|