ReadContainer and WriteContainer

ReadContainers and WriteContainers form an abstraction level that allows you to define which data is displayed or where it is written on pages of an application. Data is read with ReadContainers and written with WriteContainers.

The "ReadContainer" and "WriteContainer" areas can be shown or hidden via the "View" main menu. If you select an application page in the application structure, the Read or WriteContainer area shows which containers are defined for this page.

With ReadContainers, data from the data group that contains the current applications page are read. With WriteContainers, data can be written to any data group in the same application. You can also use custom ReadContainers and WriteContainers to integrate custom Java classes. Information on this subject is available in our Academy seminars.

ReadContainer

Every application page has exactly one ReadContainer for the data group in which it is contained. Exceptions are the view pages on the first level in the application structure (directly below the application node) and pages of a system data group. These pages do not have a ReadContainer and one cannot be created for them.

In addition to the predefined ReadContainer on application pages in a data group, custom ReadContainers can be created that enable you to integrate custom Java classes.

Add ReadContainer

Opens a dialog in which a new user-defined ReadContainer can be created.

Name

The name of a ReadContainer is usually the name of the data group that is the source of the data. The name can be modified but it has to be unique. If this is not the case, a corresponding message is displayed.

Type

The "User-defined" type can be selected here for a ReadContainer. Any number of ReadContainers in this type can be created.

Custom class

Here you can integrate your own Java classes for the "User-defined" type, e.g. to read data from a specific database table. More information on this subject is available in our Academy seminars.

Click on "OK" to create a new ReadContainer and close the dialog again.

Edit ReadContainer

You can find all the information here.

Delete ReadContainer

Deletes the currently selected ReadContainer.

Bindings

Bindings link the data read via the ReadContainer to the application elements on the page. All application elements that have a binding are listed here.

Delete binding

Deletes the binding currently selected.

Properties

You can access the properties for each ReadContainer by clicking on "Edit".

In addition to the name of the ReadContainer, you will also find the type here. The following types are available:

  • Data group

    This type is used for the default ReadContainer that is automatically created for each application page in a data group. The name of such a ReadContainer is formed from the prefix "READ_" and the name of the data group. The data group type is basically used for containers that provide data from a data group.

  • Multi Input

    This type is used for free layout table that the current page contains. For each freely designed table, exactly one ReadContainer with the type "Multi-Input" is automatically created on the page on which the table is located when the table is created. The name is formed from the prefix "READ_" and the GUID of the freely created table. This also applies to WriteContainer.

  • Custom

    This type is used for ReadContainers that integrate custom Java classes.

If the page is in a data group, you will also find the application and data group from which the data is read in the ReadContainer properties.

Filter criteria

The source and destination of the ReadContainer is specified in the lower area of the properties. Click on "Edit filter criterion" to access the filter settings for the "Data group" and "User-defined" types.

With the "Data group" type, these criteria are usually already meaningfully pre-assigned. The filter criteria inform the page which data record is to be displayed. The data restriction using filter criteria corresponds to the WHERE clause in the SELECT statement in the database request. As a page in a data group should only display a single data record, not all combinations of source and target values can be selected in every situation when editing the filter criteria. This means that a request cannot return more than one data record, which would cause an error when loading the page. The filter criteria are deactivated for the "Multi-Input" type, as the display of the data in a freely designed table is controlled by the pages included in it.

The selector GUID can be copied to the clipboard by clicking the button on the right.

Source

The location of the value to be compared with the target values is defined here. The following sources may be considered:

  • Control - here you can select an application element on the page.

  • Parameters

  • Data field - the desired ReadContainer can also be selected here

  • Session / Request / Processing context

  • Static value

  • Velocity script

  • Current user - the desired user data can be selected here

  • System data group

  • Other - you can store your parameter name here

Goal

Displays the target that is used to compare the value defined in the source. If there is a match, the corresponding data record is displayed.

WriteContainer

For each application page, a WriteContainer is automatically created for the data group in which it is located. WriteContainers can be created on all pages except view pages on the first level in the application structure (directly below the application node). A data record cannot be deleted without a WriteContainer on a page.

In addition to the already defined WriteContainer of application pages located in a data group, any number of WriteContainers can be created.

Add WriteContainer / Edit WriteContainer

Opens a dialog where a new WriteContainer can be created or an existing WriteContainer can be edited.

Name

Enter a name for the WriteContainer here; this has to be unique. If this is not the case, a corresponding message is displayed.

Type

Select the desired type. With the "Data group" type, data can be written to any data groups from the current applications. If you select the "User-defined" type, the appearance of the dialog changes.

Custom class

Custom Java classes can be integrated here. You can choose between a session value, a value in the SharedState or from a tenant (SelectedTenants). More information on this subject is available in our Academy seminars.

Click on "OK" to create the new WriteContainer and close the dialog again.

Delete WriteContainer

Deletes the currently selected WriteContainer.

Bindings

All application elements that have a binding can be added or edited here. Elements can also be moved from the workspace to the bindings area using drag & drop.

Add binding / Edit binding

You can find all the information here.

Delete binding

Deletes the binding currently selected.

Move up / Move down

The arrow buttons can be used to change the order in which the bindings are processed.

Properties

The properties of the WriteContainer correspond to the properties of the ReadContainer.

The WriteContainer also has the "Trigger process" setting. The setting is already enabled when a WriteContainer is created. It causes data group event handlers that listen to the same data group as the WriteContainer to be started automatically when the "Add data set", "Save" or "Delete" actions are executed in the browser on the page that contains the WriteContainer. If the setting is not set, the event handler does not react and does not trigger the following process steps. This is useful when constructing wizards that lead the users through multiple edit pages in the browser, for example. By activating the ""Trigger workflow"" setting, you can control that the event handler is only triggered when the Save button on the last page of the wizard is clicked on.

The source and destination of the ReadContainer is specified in the lower area of the properties. Click on "Edit filter criterion" to access the filter settings for the "Data group" and "User-defined" types.

Filter criteria / Binding

This dialog is used for editing filter criteria and bindings.

The filter criteria inform the page which data record is to be saved. The data restriction using filter criteria corresponds to the WHERE clause in the UPDATE statement in the database request. As a page in a data group should only write a single data record, not all combinations of source and target values can be selected in every situation when editing the filter criteria. This means that a request cannot edit more than one data record, which would cause an error when saving the page. The filter criteria are deactivated for the "Multi-Input" type, as the writing of data in a freely designed table is controlled by the pages included in it.

Source

Displays the source of the filter criteria. The source corresponds to the value that should be used to filter the data in the data group. All information on the various sources can be found here.

Goal

Displays the target that is used to compare the value defined in the source. If there is a match, the corresponding data record is selected for writing the data.

The desired mode - "Change and add data record", "Change data record" or "Add data record" - can be selected with "Use for".

Copy files - Bindings

Files can be copied with a WriteContainer. You can find detailed instructions on how to do this in our Tips & Tricks article "Copying files using WriteContainer".

Container/data field

Specify the source of the file(s) being copied here.

Target data field

Select the file data field here where the copy will be stored.

Use with

Here you can select the desired mode - "Change and add data record", "Change data record" or "Add data record".

Number of source files to copy

Enter the number here. With the value "-1", all files contained in the data set are copied.

Source file name filter

The source files can be filtered by name here. All files are selected with "*".

Quantity/Apply filter from

If a number or a filter is defined, you can specify here whether the copying process starts from the beginning of the source files or from the end of the source files.

Copy mode destination file(s)

Select the copy mode here.