This functionality is only available for certain module packages.

You are here: Reference > Form-UI > Structure > fileSelectionForm

fileSelectionForm

A <fileSelectionForm> is used for file selection. The file selection window is called with the element <open> and the ID of the window. The selected file can be directly processed by a script or the absolute name can be passed to a parameter.

The title (see 1 in the figure File selection window) and the selectable file type (see 2 in File selection window) can be defined for the file selection window.

The fileSelectionForm is called by using the element open from another Form-UI or from a Graph2D diagram.

The representation of the file selection window differ depending on whether it is started in a desktop or Web EEC installation.

If the [Cancel] button is not to execute any action, it need not be explicitly shown in the fileButtonArea. An action should always be provided for the [OK] button.

For the action that is triggered upon actuating a button, no argument need be provided in the list of arguments for the run() method for the selected file path (see figure File path for action). EEC will append the absolute path to the selected file as the last argument before the run() method of the action is called.

It is merely ensured that the transferred filename is the same as the one that is returned by <fileSelectionForm>.

Note:

In a Client/Server environment, the path of the client side is replaced by a temporary path on the server side - for example, the client-side c:\test\BOM.csv becomes, on the server side, c:\tmp\33568991\BOM.csv.

Note:

In a Web EEC environment an upload file is stored in a temporary file below <Tomcat_Installation Path>\temp. This folder is called fileupload_<Session_Number>.

Note:

The associated temporary folder is deleted by terminating or exiting a session. The data in the temporary folder are then no longer available for any generations of target data possibly started beforehand.

Attribute name Usage Attribute values Default value Description
id required any unique ID, which is referred to as reference
title required any Name of the Form-UI
Allowed sub-elements Quantity
fileButtonArea 0..1
fileFilters (not for Web EEC) 0..1
pathLocation (not for Web EEC) 0..1