xAPPnow LOW CODE PLATFORM - User Manual 

Still no account yet?

×

UI Element - File Download

 
Related subfolder of the training project: "Training/UIM/Exercise/Basic"
 
 

Chapter Overview

 
In this training chapter you get familiar with the configuration possibilities of the UI Element File Download.
 
 
 
TAB "Element Properties"
 
The TAB "Element Properties" contains the configuration for
 
  • value horizontal alignment (left, center, right)
  • UI element width configuration (percentage, pixel)
  • UI container horizontal alignment (left, center, right)
  • UI element height configuration (pixel)
  • UI container vertical alignment (top, middle, botton)
  • UI element icon configuration (default, custom, before text)
  • UI element filename (default, text before, hide button)
     
     
     
     
     
    TAB "Data Mapping"
     
    The TAB "Data Mapping" contains the attribute type related mapping of the UI element and the button label configuration
     
  • file
  • default label
  • custom label
     
     
     
     
     
     
    TAB "Events"
     
    The TAB "Events" contains the events and related "Action" and "Validation" scripts of the UI element.
     
  • onClick
     
     
    For each UI element the related event action is displayed at the right side of the UI element. In case of a validation error a default error message is displayed at the top right of the UI page and the action script is not executed.
     
     
     
     
     
     
    TAB "Visibility"
     
    The TAB "Visibility" contains the visibility configuration and the "Visibility" scripts of the UI element.
     
  • enabled/disabled
  • visible/invisible
     
    For each UI element the visibility can be changed by the checkbox "Visibility Toggle".
     
     
     
     
     
     
     

Exercise

 
In this exercise you will get familiar with the configuration possibilities of the UI element by completing the UI TABs as described above. You can test the implementation in UI Page Preview, in the Preview of the Frontend Service Model and optionally in the xAPPnow User Portal after publish process located in folder "Automation/Business Process/Training/UIM/Exercise/Basic/FileDownload"
 
 
Exercise 1: Create UI Page "FileDownload"
 
  • Step 1: Open context menu of folder "Automation/User Interface/Training/UIM/Exercise/Basic" in the model tree
  • Step 2: Select menu function "Create Model" to open dialog "Create User Interface Model"
  • Step 3: Enter model name "FileDownload" and keep option "Model Type: UI Page"
  • Step 4: Select option "From: UI Page" to open dialog "Select UI Page", open folder "…/Training/UIM/Template/Basic" to select template "TMPL_FileDownload" with double click then keep default option for "Default Device" and click button "OK" to create the UI page
     
     
     
     
     
     
Exercise 2: TAB "Element Properties"
 
  • Step 1: Drag&Drop UI File download element from palette into second free span
     
     
     
    UI Element - File Download
     
     
     
  • Step 2: Repeat Step 2 and drag&drop UI File download to
  • H-Aligment [Center], [Right]
  • Width [50%], [100px]
  • Container H-Alignment [Left], [Center], [Right]
  • Height [50px], [25px]
  • Container V-Alignment [Top], [Middle], [Bottom]
  • Icon [Default], [Custom], [Before Text]
     
     
     
    UI Element - File Download
     
     
     
  • Step 3: Open TAB "Implementation" SubTab "Element Properties" and select each UI File download to configure the value H-Alignment [Left], [Center], [Right]
     
     
     
    UI Element - File Download
     
     
     
  • Step 4: In next row select the UI File download to configure width [50%] and width [100px]
     
     
     
    UI Element - File Download
     
     
     
  • Step 5: Select each UI File download of the next row to configure width [50%]. Then select each of them again and click at button "Span" to configure H-Alignment [Left], [Center], [Right] of the UI element
     
     
     
    UI Element - File Download
     
     
     
  • Step 6: Select each UI File download of next section to configure height [50px] and height [25px]
     
     
     
    UI Element - File Download
     
     
     
  • Step 7: Select each UI File download of the next row to configure height [25px]. Then select each of them again and click at button "Span" to configure V-Alignment [Top], [Middle], [Bottom] of the UI element
     
     
     
    UI Element - File Download
     
     
     
  • Step 8: Select first UI File download of next section and click button "Icon" to open dialog "Select Icon" and display default icon configuration. Click button "Save" to close dialog and apply the icon configuration for the UI element.
     
     
     
    UI Element - File Download
     
     
     
     
     
  • Step 9: Select second UI File download of the section and click button "Icon" to open dialog "Select Icon" and display default icon configuration.
  • Step 10: Specify icon "fa fa-file-download" and keep the values for color related fields to maintain default color "white" and click "Save"
     
     
     
    UI Element - File Download
     
     
  • Step 11: Select third UI File download of the section and click button "Icon" to open dialog "Select Icon" and display default icon configuration.
  • Step 12: Check property "Before Text" on dialog "Select Icon" and click button "Save" to apply icon configuration
     
     
     
    UI Element - File Download
     
     
     
  • Step 13: Select first UI File download of the next row to display the file name configuration default values
     
     
     
    UI Element - File Download
     
     
  • Step 14: Select second UI File download of the row to check option "Show Filename" that will enable option "Text Before"
  • Step 15: Check option "Text Before" to display file name before the UI File download element.
     
     
     
    UI Element - File Download
     
     
     
  • Step 16: Select third UI File download of the row to uncheck option "Show Button"
     
     
     
    UI Element - File Download
     
     
     
Exercise 3: TAB "Data Mapping"
 
  • Step 1: Drag&Drop attribute "testFiles.allFiles" from TAB "Data" into second free span of first row to open dialog "Select Component" to add the corresponding UI File download and uncheck property "Create label"
     
     
     
     
    UI Element - File Download
     
     
     
     
     
     
  • Step 2: Repeat Step 1 to add UI File download for the spans below
     
     
     
    UI Element - File Download
     
     
     
  • Step 3: Select third UI File download and open TAB "Implementation" SubTab "Data Mapping" and SubTab "Definition Objects".
  • Step 4: Search "DownloadLabel" definition object and map "HERE" enum value on field "Label "Download"".
     
     
     
    UI Element - File Download
     
     
     
Exercise 4: TAB "Events" - Action Scripts
 
  • Step 1: Drag&Drop attribute "testFiles.allFiles" from TAB "Data" into free span to open dialog "Select Component" to add the corresponding UI File download to the UI page and uncheck property "Create label"
     
     
     
    UI Element - File Download
     
     
     
  • Step 2: Select the first UI File download and open TAB "Implementation" SubTab "Events" to specify event type "onClick"
  • Step 3: Implement the action script, which displays the related event action at the right side of the UI element.
 
localData.eventType.onClick = globalDef.enums.Tutorial.UIM.DEF.EventMessage.ON_CLICK;
 
 
 
 
UI Element - File Download
 
 
 
Exercise 5: TAB "Events" - Action & Validation Scripts
 
  • Step 1: Select the first UI File upload of the section and open TAB "Implementation", SubTab "Events" to specify event type "onClick"
  • Step 2: Implement the action the validation scripts, which display the related event action at the right side of the UI element in case of no validation error.
     
  • action script "onClick" event
localData.eventType.onClickValid = globalDef.enums.Tutorial.UIM.DEF.EventMessage.ON_CLICK_VALID;
 
  • validation script "onClick" event
localData.eventType.isValid
 
 
 
UI Element - File Download
 
 
 
Exercise 6: TAB "Visibility"
 
  • Step 1: Drag&Drop attribute "toggleVisibility" from TAB "Data" into the fourth free span of third row to open dialog "Select Component" to add the corresponding UI Label and UI CheckBox to the UI page.
     
     
     
    UI Element - File Download
 
 
 
  • Step 2: Select the first UI File download and open TAB "Implementation" SubTab "Visibility"
  • Step 3: Click at visibility type "Enabled" and select state "Script"
  • Step 4: Implement the visibility script, which toggles the visibility "enabled" and "disabled"
 
localData.toggleVisibility
 
 
 
 
 
UI Element - File Download
 
 
 
  • Repeat steps 2..4 for second UI File download for visibility type "Visible", which toggles the visibility "visible" and "invisible"
     
     
     
     
     
     
Exercise 7: Set UI Page as submodel of the Frontend Service Model
 
  • Step 1: Open frontend service model "Automation/Service/Training/UIM/Exercise/Basic/FileDownload"
  • Step 2: Select UI page "Download File" to open TAB "General", SubTAB "Element"
  • Step 3: Click button “Search“ to open dialog "Select or Create Submodel" and select UI page "FileDownload" with double click
     
     
     
     
     
     
  • Step 4: Right click on button flow to set label with "Exit" flow.
     
     
     
     
     
 
1

Drag&Drop UI File download from Palette

1. Drag&Drop UI File download from Palette
Drag&Drop UI File download element from palette into second free span
 
1

Drag&Drop UI File download from Palette

1. Drag&Drop UI File download from Palette
Drag&Drop UI File download element from palette into free span
2

Drag&Drop UI File download from Palette

2. Drag&Drop UI File download from PaletteDrag&Drop UI File download element from palette into free span
3

Drag&Drop UI File download from Palette

3. Drag&Drop UI File download from Palette
Drag&Drop UI File download element from palette into free span
4

Drag&Drop
UI File download
from Palette

4. Drag&Drop 
UI File download
from Palette
Drag&Drop UI File download element from palette into free span
5

Drag&Drop UI File download from Palette

5. Drag&Drop UI File download from Palette
Drag&Drop UI File download element from palette into free span
 
1

Select UI Element

1. Select UI Element
Select UI File download
2

Configure Value H-Alignment

2. Configure Value H-Alignment
Configure the value H-Alignment [Left], [Center], [Right], accordingly
 
1

Select UI Element

1. Select UI Element
Select UI File download
2

Configure UI Element Width

2. Configure UI Element Width
Configure width [50%] and width [100px], accordingly
1

Click Button "Span"

1. Click Button "Span"
Click at button "Span"
2

Configure H-Alignment

2. Configure H-Alignment
Configure H-Alignment [Left], [Center], [Right] of the UI element
1

Select UI Element

1. Select UI Element
Select each UI File download
2

Configure UI Element Height

2. Configure UI Element Height
Configure height [50px] and height [25px]
1

Click Button "Span"

1. Click Button "Span"
Click at button "Span"
2

Configure V-Alignment

2. Configure V-Alignment
Configure V-Alignment [Top], [Middle], [Bottom] of the UI element, accordingly
 
1

Select UI Element

1. Select UI Element
Select first UI File download
2

Click Button "Icon"

2. Click Button "Icon"
Click button "Icon" to open dialog "Select Icon"
1

Specify Icon

1. Specify Icon
Specify icon "fa fa-file-download"
2

Click Button "Save"

2. Click Button "Save"
Click button "Save" to close dialog and apply the icon configuration for the UI element.
1

Configure Icon Position

1. Configure Icon Position
Check option "Before Text"
 
1

Select UI Element

1. Select UI Element
Select first UI File download
2

Default Filename Configuration

2. Default Filename Configuration
Notice the default values for file name configuration
1

Select UI Element

1. Select UI Element
Select second UI File download
2

Check Option "Show Filename"

2. Check Option "Show Filename"
Check option "Show Filename" that will enable option "Text Before"
3

Check Option "Text Before"

3. Check Option "Text Before"
Check option "Text Before" to display file name before the UI File download element.
1

Select UI Element

1. Select UI Element
Select third UI File download of the row
2

Uncheck Option "Show Button"

2. Uncheck Option "Show Button"
Uncheck option "Show Button" to only display the label of the UI Element
1

Drag&Drop Attribute from TAB "Data"

1. Drag&Drop Attribute from TAB "Data"
Drag&Drop attribute "testFiles.allFiles" from TAB "Data" into second free span of first row
1

Drag&Drop Attribute from TAB "Data"

1. Drag&Drop Attribute from TAB "Data"
Drag&Drop attribute "testFiles.allFiles" from TAB "Data" into second free span remaining rows
1

Select UI Element

1. Select UI Element
Select third UI File download and open TAB "Implementation" SubTab "Data Mapping" and SubTab "Definition Objects"
2

Search Attribute

2. Search Attribute
Search "DownloadLabel" definition object
3

Map "Download"

3. Map "Download"
Map "HERE" enum value on field "Label "Download""
1

Drag&Drop Attribute from TAB "Data"

1. Drag&Drop Attribute from TAB "Data"
Drag&Drop attribute "testFiles.allFiles" from TAB "Data" into first free span of first row
1

Select UI Element

1. Select UI Element
Select first UI File download and open TAB "Implementation" SubTab "Events"
2

Specify Event Type

2. Specify Event Type
Specify event type "onClick"
3

Enter Action Script

3. Enter Action Script
Implement the action script
4

Event Action

4. Event Action
Displays the related event action at the right side of the UI element.
1

Select UI Element

1. Select UI Element
Select first UI File download and open TAB "Implementation" SubTab "Events"
2

Specify Event Type

2. Specify Event Type
Specify event type "onClick"
3

Enter Action&Validation Scripts

3. Enter Action&Validation Scripts
Implement the action script and validation script
4

Event Action

4. Event Action
Displays the related event action at the right side of the UI element.
1

Drag&Drop Attribute from TAB "Data"

1. Drag&Drop Attribute from TAB "Data"
Drag&Drop attribute "toggleVisibility" from TAB "Data" into the third free span of third row to open dialog "Select Component" to add the corresponding UI Label and UI CheckBox to the UI page.
1

Select UI Element

1. Select UI Element
Select the first UI File download and open TAB "Implementation" SubTab "Visibility"
2

Select "Enabled" and State "Script"

2. Select "Enabled" and State "Script"
Click at visibility type "Enabled" and select state "Script"
3

Enter Visibility Script

3. Enter Visibility Script
Implement the visibility script, which toggles the visibility "enabled" and "disabled"