File link
FileLink
Resources
Attribute | Description |
---|---|
data | Use only, if a base64 file is provided for download! Defines which data is to be downloaded. Possible values: Data binding expression The Data Binding expression must refer to a property of type |
displayName | Name of the file that is displayed in the web application and is assigned as the file name for the downloaded file.
Possible values: Any string incl. file extension |
fileName | Identifier for the Technical Process that provides the data.
Possible values: Any string |
process | Technical Process that provides the data. Possible values: String (URI) |
background | Defines a color for the background of the control.
Possible values:
|
fileId | Identifier that can be used by the process developer.
Possible values: Any string |
enabled | Defines if the user can interact with the control.
Possible values:
The
enabled attribute replaces the obsolete disabled attribute. enabled="true" thus corresponds to the obsolete
disabled="false" attribute
.
|
fontFamily | Defines the font family.
Possible values:
|
fontSize | Defines the font size.
Possible values:
|
fontStretch | Sets the width of the single characters.
This attribute overrides the default width of the characters of the Web App for this control.
Possible values:
This attribute doesn't work with the |
fontStyle | Defines the font style.
This attribute overrides the default style of the characters of the Web App for this control.
Possible values:
This attribute doesn't work with the |
fontWeight | Defines the font weight.
This attribute overrides the default font weight of the Web App for this control.
Possible values:
This attribute doesn't work with the |
foreground | Defines a color for the foreground (texts etc.) of the control.
Possible values:
|
horizontalAlign | Direction in which the elements flow. The order of the elements corresponds to their declaration. Possible values:
|
textOverflow | Defines what happens if the page is full. Possible values:
|
visible | Defines if the control is visible.
Possible values: |
Example <FileLink>
(File download from a static resource)
The following example shows the usage of the <FileLink>
tag. The file 1.pdf
which is to be made available for download is located directly in the Resources
folder and is delivered via the Technical Process process_1.wrf
in the Services/Processes
folder. Both a file and a Technical Process must be available for a download.
Example FileLink
<WebApp xmlns="http://softproject.de/webapp/1.0" path="download">
<Modules>
<Module path="Module" displayName="My Module">
<Components>
<DetailComponent path="Dashboard"
displayName="Dashboard" default="true">
<FlowLayout>
<FileLink process="process_1.wrf" fileName="1.pdf" displayName="example.pdf" />
</FlowLayout>
</DetailComponent>
</Components>
</Module>
</Modules>
</WebApp>
The file link is defined in the Web App definition above. For FileLink
a Technical Process is stored that supplies the file (process_1.wrf
). A display name is assigned (displayName=”example.pdf”
) that is used as text in the Web App and as file name for the download. The attribute fileName
is not relevant in this example, this attribute can be used in more complex applications because it is returned to the processing Technical Process by the control:
Input FileLink
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<fileId>1.pdf</fileId>
The code from the example for FileLink
creates the following view in the web application: