xAPPnow LOW CODE PLATFORM - User Manual 

Still no account yet?

×

UI Element - ListBox

 
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 ListBox.
 
 
 
TAB "Element Properties"
 
The TAB "Element Properties" contains the configuration for
 
  • UI element value horizontal alignment (left, center, right)
  • UI element width configuration (percentage, pixel)
  • UI container horizontal alignment (left, center, right)
  • UI element visible rows (1 row, 3 rows, 6 rows)
  • Show internal label (checked, unchecked)
     
     
     
     
     
     
     
    TAB "Data Mapping"
     
    The TAB "Data Mapping" contains the attribute type related mapping of the UI element
     
  • enum
  • generic error code
  • db error code
     
     
     
     
     
     
    TAB "Data Validation"
     
    The TAB "Data Validation" contains the attribute type related validation, default value and mandatory specification of the UI element based on the BO attribute configuration in SubTAB "Values and Validation".
     
  • default value
  • enum mandatory
     
     
     
     
     
     
    TAB "Events"
     
    The TAB "Events" contains the events and related "Action" and "Validation" scripts of the UI element.
     
  • onClick
  • onDoubleClick
  • onBlur
  • onChange
     
    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
  • mandatory/not mandatory
     
    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.
 
 
Exercise 1: Create UI Page "ListBox"
 
  • 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 "ListBox" 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_ListBox" with double click then keep default option for "Default Device" and "Default Label" then click button "OK" to create the UI page
     
     
     
     
     
Exercise 2: TAB "Element Properties"
 
  • Step 1: Drag&Drop attribute "questionare" from TAB "Data" into second free span and select option "ListBox" in dialog "Select Component" to add the corresponding UI Label and UI ListBox to the UI page.
     
     
     
     
    UI Element - ListBox
     
     
     
     
     
     
  • Step 2: Repeat Step 1 and add Label and ListBox for attribute "questionare" to
  • H-Aligment [Center], [Right]
  • Width [50%], [200px]
  • Container H-Aligment [Left], [Center], [Right]
  • Visible Rows [1 row], [3 rows], [6 rows]
  • Show Internal Label [Unchecked], [Checked]
     
     
     
    UI Element - ListBox
     
     
     
  • Step 3: Open TAB "Implementation" SubTab "Element Properties" and select each UI ListBox on "H-Alignment" to configure the values [Left], [Center], [Right]
     
     
    UI Element - ListBox
     
     
     
  • Step 4: In next row select the UI ListBox to configure width [50%] and width [200px]
     
     
     
    UI Element - ListBox
     
     
     
  • Step 5: In row "Container (H-Alignment)" for each UI ListBox:
  • Select each UI ListBox to configure width [50%].
  • Select button "Span" to configure H-Alignment [Left], [Center], [Right] of the UI element
     
     
     
    UI Element - ListBox
     
     
     
  • Step 6: Select each UI ListBox for "Visible Rows" property to configure Visible rows with [1 row], [3 row], [6 rows]
     
     
     
    UI Element - ListBox
     
     
     
Exercise 3: TAB "Data Mapping"
 
  • Step 1: Drag&Drop attribute "person.gender" from TAB "Data" into second free span of second row to open dialog "Select Component" to add the corresponding UI Label and UI ListBox to the UI page.
     
     
     
    UI Element - ListBox
     
     
     
  • Step 2 Repeat Step 1 select ListBox without Label for attributes
  • "genericError.errorCode"
  • "errorDB.errorCode"
 
 
 
UI Element - ListBox
 
 
 
Exercise 4: TAB "Data Validation"
 
  • Step 1: Drag&Drop attribute "academicLevel" from TAB "Data" into the third free span of second row and select "ListBox" in dialog "Select Component" to add the corresponding UI Label and UI ListBox to the UI page.
     
 
 
UI Element - ListBox
 
 
  • Step 2: Repeat Step 1 and add Label and ListBox for attribute
  • "maritalStatus"
     
     
 
 
 
UI Element - ListBox
 
 
 
 
Exercise 5: TAB "Events" - Action Scripts
 
  • Step 1: Drag&Drop attribute "employment" from TAB "Data" into second free span and select "ListBox" in dialog "Select Component" to add the corresponding UI Label and UI ListBox to the UI page.
     
 
 
 
UI Element - ListBox
 
 
  • Step 2 Repeat Step 1 to add Label and ListBox for attributes
  • "musicalGenre"
  • "color"
  • "continent"
     
    UI Element - ListBox
     
     
     
  • Step 3: Select the first UI ListBox and open TAB "Implementation" SubTab "Events" to specify event type "onClick"
  • Step 4: 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 - ListBox
 
 
 
  • Step 5: Repeat Step 3 and 4 for the other UI elements to specify further event types and related action scripts, which display the related event action at the right side of the UI element.
     
  • event type "onDoubleClick"
localData.eventType.onDoubleClick = globalDef.enums.Tutorial.UIM.DEF.EventMessage.ON_DOUBLE_CLICK;
 
  • event type "onBlur"
localData.eventType.onBlur = globalDef.enums.Tutorial.UIM.DEF.EventMessage.ON_BLUR;
 
  • event type "onChange"
localData.eventType.onChange = globalDef.enums.Tutorial.UIM.DEF.EventMessage.ON_CHANGE;
 
 
 
 
UI Element - ListBox
 
 
Exercise 6: TAB "Events" - Action & Validation Scripts
 
  • Step 1: Select the first UI ListBox 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 - ListBox
 
 
 
  • Step 3: Repeat Step 1 and 2 for the other UI elements to specify further event types and related action and validation scripts, which display the related event action at the right side of the UI element.
     
  • action script
  • "onDoubleClick" event
localData.eventType.onDoubleClickValid = globalDef.enums.Tutorial.UIM.DEF.EventMessage.ON_DOUBLE_CLICK_VALID;
 
  • "onBlur" event
localData.eventType.onBlurValid = globalDef.enums.Tutorial.UIM.DEF.EventMessage.ON_BLUR_VALID;
 
  • "onChange" event
localData.eventType.onChangeValid = globalDef.enums.Tutorial.UIM.DEF.EventMessage.ON_CHANGE_VALID;
 
 
 
  • validation script
  • "onDoubleClick" event
localData.eventType.isValid
 
  • "onBlur" event
localData.eventType.isValid
 
  • "onChange" event
localData.eventType.isValid
 
 
 
 
UI Element - ListBox
 
 
 
 
Exercise 7: TAB "Visibility"
 
  • Step 1: Drag&Drop attribute "toggleVisibility" from TAB "Data" into the third free span of second row and keep default in dialog "Select Component" to add the corresponding UI Label and UI CheckBox to the UI page.
 
 
UI Element - ListBox
 
 
 
  • Step 2: Select the first UI ListBox 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 - ListBox
 
 
  • Step 5: Repeat steps 2..4 for second and third UI ListBox for visibility type  "Visible", which toggles the visibility "visible" and "invisible"
 
 
 
UI Element - ListBox
 
 
 
Exercise 8: Set UI Page as submodel of the Frontend Service Model
 
  • Step 1: Open frontend service model  "Automation/Service/Training/UIM/Exercise/Basic/ListBox"
  • Step 2: Select UI page "View ListBox" to open TAB "General", SubTAB "Element"
  • Step 3: Click button “Search“ to open dialog "Select or Create Submodel" and select UI page "ListBox" with double click 
     
     
     
  • Step 4: Right click on button flow to set label with "Exit" flow.
 
 
 
 
Exercise 9: Test the UI Page
 
  • Step 1: Open UI Page and click button "Preview" in the toolbar to directly test the UI page within the UI editor
  • Step 2: Optionally publish the frontend service model and test the UI page in User Portal
 
 
 
 
 
1

Drag&Drop Attribute from TAB "Data"

1. Drag&Drop Attribute from TAB "Data"
Drag&Drop attribute "questionare" from TAB "Data" into second free span
1

Drag&Drop Attribute from TAB "Data"

1. Drag&Drop Attribute from TAB "Data"
Drag&Drop attribute "questionare" from TAB "Data" into free span
2

Drag&Drop Attribute from TAB "Data"

2. Drag&Drop Attribute from TAB "Data"
Drag&Drop attribute "questionare" from TAB "Data" into free span
3

Drag&Drop Attribute from TAB "Data"

3. Drag&Drop Attribute from TAB "Data"
Drag&Drop attribute "questionare" from TAB "Data" into free span
4

Drag&Drop Attribute from TAB "Data"

4. Drag&Drop Attribute from TAB "Data"
Drag&Drop attribute "questionare" from TAB "Data" into free span
1

Configure Value H-Alignment

1. Configure Value H-Alignment
Select each UI ListBox on "H-Alignment" to configure the values [Left], [Center], [Right]
1

Configure Element Width

1. Configure Element Width
Select the UI ListBox to configure width [50%] and width [200px]
1

Click Button "Span"

1. Click Button "Span"
Select button "Span" to configure H-Alignment [Left], [Center], [Right] of the UI element
1

Configure Element Visible Rows

1. Configure Element Visible Rows
Configure Visible rows with [1 row], [3 row], [6 rows]
1

Drag&Drop Attribute from TAB "Data"

1. Drag&Drop Attribute from TAB "Data"
Drag&Drop attribute "person.gender" from TAB "Data" into second free span of second row
1

Drag&Drop Attribute from TAB "Data"

1. Drag&Drop Attribute from TAB "Data"
Drag&Drop attributes from TAB "Data" into free spans to add UI ListBox without Label
1

Drag&Drop Attribute from TAB "Data"

1. Drag&Drop Attribute from TAB "Data"
Drag&Drop attribute "academicLevel" from TAB "Data" into third free span of second row
1

Drag&Drop Attribute from TAB "Data"

1. Drag&Drop Attribute from TAB "Data"
Drag&Drop attribute "maritalStatus" from TAB "Data" into third free span of third row
1

Drag&Drop Attribute from TAB "Data"

1. Drag&Drop Attribute from TAB "Data"
Drag&Drop attribute from TAB "Data" into free span
1

Drag&Drop Attribute from TAB "Data"

1. Drag&Drop Attribute from TAB "Data"
Drag&Drop attribute from TAB "Data" into free span
1

Select UI Element

1. Select UI Element
Select the UI ListBox and open TAB "Implementation" SubTab "Events"
2

Specify Event Type

2. Specify Event Type
Specify event type
3

Enter Action Script

3. Enter Action Script
Implement action script
4

Event Action

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

Select UI Element

1. Select UI Element
Select the UI ListBox and open TAB "Implementation" SubTab "Events"
2

Specify Event Type

2. Specify Event Type
Specify event type
3

Enter Action Script

3. Enter Action Script
Implement action script
4

Event Action

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

Select UI Element

1. Select UI Element
Select the UI ListBox and open TAB "Implementation" SubTab "Events"
2

Specify Event Type

2. Specify Event Type
Specify event type
3

Enter Action & Validation Scripts

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

Event Action

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

Select UI Element

1. Select UI Element
Select the UI ListBox and open TAB "Implementation" SubTab "Events"
2

Specify Event Type

2. Specify Event Type
Specify event type
3

Enter Action & Validation Scripts

3. Enter Action & Validation Scripts
The related event action at the right side of the UI element.
4

Event Action

4. Event Action
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 second row and keep default in 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 UI element and open TAB "Visibility"
2

Select "Enabled" and State "Script"

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

Enter Visibility Script

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

Select UI Element

1. Select UI Element
Select UI element and open TAB "Visibility"
2

Select "Visible" and State "Script"

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

Enter Visibility Script

3. Enter Visibility Script
Implement the visibility script, which toggles the visibility "visible" and "invisible"