xAPPnow LOW CODE PLATFORM - User Manual 

Still no account yet?

×

UI Element - Dynamic ComboBox

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

Chapter Overview

 
The Dynamic ComboBox provides the possibility to display attribute values, a combination of attribute values as well as including further attribute calculation (e.g “Song Title – Author”, “Item, Price”).
 
In this training chapter you get familiar with the configuration possibilities of the UI Element Dynamic ComboBox.
 
 
 
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)
  • key expression (name + rating, name + price)
     
 
 
 
 
 
TAB "Data Mapping"
 
The TAB "Data Mapping" contains the attribute type related mapping of the UI element
 
  • Business Object (BO) list
  • BO
 
 
 
 
 
 
 
 
TAB "Events"
 
The TAB "Events" contains the events and related "Action" and "Validation" scripts of the UI element.
 
  • onClick
  • 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 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.
 
 
Exercise 1: Create UI Page "Dynamic ComboBox"
 
  • 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 "DynamicComboBox" 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_DynamicComboBox" with double click then keep default option for "Default Device" and click button "OK" to create the UI page
     
     
 
 
 
Exercise 2: TAB "Data Mapping"
 
  • Step 1: Drag&Drop attribute "issueMapingList" from Data TAB into first free span of second row to open dialog "Select Component" and add the corresponding UI Dynamic ComboBox to the UI page
  • Step 2: Select UI Dynamic Combobox and open TAB "Implementation", SubTAB "Data Mapping" to map BO "issueMapping" into property "Single selection"
 
 
 
UI Element - Dynamic ComboBox
 
 
  • Step 3: Select UI Dynamic Combobox and open TAB "Implementation", SubTAB "Element Properties" and click button "Data Config" to open dialog "Key and Value Configuration"
  • Step 4: Select key "issueName: Issue Name" and on textarea "Value Configuration Script"  enter the following line to display a label plus the name of the issue:
 
"Issue - " + obj.issueName;
 
 
 
 
 
 
 
 
Exercise 3: TAB "Element Properties"
 
  • Step 1: Drag&Drop attribute "instrumentList" from TAB "Data" into first free span to open dialog "Select Component", select "DynamicComboBox" on list to add the corresponding UI Dynamic ComboBox to the UI page and click button "OK".
 
 
 
 
 
UI Element - Dynamic ComboBox
 
 
  • Step 2: Repeat Step 1 and add UI Dynamic ComboBox
  • H-Aligment [Center], [Right]
  • Width [50%], [100px]
  • Container H-Aligment [Left], [Center], [Right]
 
 
 
UI Element - Dynamic ComboBox
 
 
 
  • Step 3: Select each of previously added UI Dynamic ComboBox and open TAB "Implementation" SubTab "Data Mapping" to map BO "Instrument" on field "Single selection".
 
 
 
UI Element - Dynamic ComboBox
 
 
 
  • Step 4: Open TAB "Implementation" SubTab "Element Properties" and select each UI Dynamic ComboBox to configure the value H-Alignment [Left], [Center], [Right]
 
 
 
UI Element - Dynamic ComboBox
 
 
 
  • Step 5: In next row select the UI Dynamic ComboBox to configure width [50%] and width [100px]
 
 
 
UI Element - Dynamic ComboBox
 
 
  • Step 6: Select each UI Dynamic ComboBox for "Container (H-Alignment)" property 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 - Dynamic ComboBox
 
 
 
  • Step 7: Select UI Dynamic ComboBox with label "Item - Rating" and click on Data Config button to open dialog "Key and Value Configuration"
     
    REMARK: To specify "Data Config" property the UI Dynamic ComboBox must have a BO List mapped. See Exercise 3 for "Data Mapping"
     
 
 
UI Element - Dynamic ComboBox
 
 
 
  • Step 8: Select key "name: Product" and on textarea "Value Configuration Script"  enter the following line to display a label plus the name and rating of the product item:
 
"Item - Rating: " + obj.name + " - " + obj.rating;
 
REMARK: The combobox "Select Key" displays all attributtes and their labels of the mapped Business Object. In this case we select of the "StockItem" Business Object the attribute "name" which has label "Product" as the key of the Dynamic Combobox.
 
UI Element - Dynamic ComboBox
 
 
  • Step 9: Repeat Steps 7 and 8 for next UI Dynamic ComboBox with label "Item - Price" then select key "name: Product" and enter the following line:
 
"Item - Price: "+ obj.name + " - " + obj.price;
 
 
 
 
Exercise 4: TAB "Events" - Action Scripts
 
 
  • Step 1: Select the first UI Dynamic ComboBox and open TAB "Implementation" SubTab "Events" to specify event type "onClick"
  • Step 2: Implement the action script, which displays the event action at the right side of the UI element.
 
localData.eventType.onClick = globalDef.enums.Tutorial.UIM.DEF.EventMessage.ON_CLICK;
 
                       
 
 
UI Element - Dynamic ComboBox
 
 
 
 
  • Step 3: Repeat Step 1 and 2 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 "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 - Dynamic ComboBox
 
 
Exercise 5: TAB "Events" - Action & Validation Scripts
 
  • Step 1: Select the first UI ComboBox 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 - Dynamic ComboBox
 
 
 
  • 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
  • "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
  • "onBlur" event
localData.eventType.isValid
 
  • "onChange" event
localData.eventType.isValid
 
 
 
 
UI Element - Dynamic ComboBox
 
 
 
 
Exercise 6: TAB "Visibility"
 
  • Step 1: Drag&Drop attribute "toggleVisibility" from TAB "Data" into the third free span and keep default in dialog "Select Component" to add the corresponding UI Label and UI CheckBox to the UI page.
 
 
UI Element - Dynamic ComboBox
 
 
 
  • Step 2: Select the first UI Dynamic ComboBox 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 - Dynamic ComboBox
 
 
  • Step 5: Repeat steps 2..4 for second UI Dynamic ComboBox for visibility type  "Visible", which toggles the visibility "visible" and "invisible"
 
 
 
UI Element - Dynamic ComboBox
 
 
 
Exercise 7: Link UI Page to Frontend Service Model
 
  • Step 1: Open frontend service model "Automation/Service/Training/UIM/Exercise/Basic/DynamicComboBox"
  • Step 2: Select UI page "View Dynamic ComboBox" to open TAB "General", SubTAB "Element"
  • Step 3: Click button “Search“ to open dialog "Select or Create Submodel" and select UI page "DynamicComboBox" with double click
     
     
     
     
     
  • Step 3: Right click on button flow to select button "Exit".
     
 
 
Exercise 8: 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 Data TAB

1. Drag&Drop Attribute from Data TAB
Drag&Drop attribute "instrumentList" from Data TAB into first free span to open dialog "Select Component" to add the corresponding UI Dynamic ComboBox to the UI page
1

Drag&Drop Attribute from Data TAB

1. Drag&Drop Attribute from Data TAB
Drag&Drop attribute "instrumentList" from Data TAB into first free span to open dialog "Select Component" to add the corresponding UI Dynamic ComboBox to the UI page
2

Drag&Drop Attribute from Data TAB

2. Drag&Drop Attribute from Data TAB
Drag&Drop attribute "instrumentList" from Data TAB into first free span to open dialog "Select Component" to add the corresponding UI Dynamic ComboBox to the UI page
3

Drag&Drop Attribute from Data TAB

3. Drag&Drop Attribute from Data TAB
Drag&Drop attribute "instrumentList" from Data TAB into first free span to open dialog "Select Component" to add the corresponding UI Dynamic ComboBox to the UI page
4

Drag&Drop Attribute from Data TAB

4. Drag&Drop Attribute from Data TAB
Drag&Drop attribute "instrumentList" from Data TAB into first free span to open dialog "Select Component" to add the corresponding UI Dynamic ComboBox to the UI page
1

Configure Value H-Alignment

1. Configure Value H-Alignment
Open TAB "Element Properties" and select each UI Dynamic ComboBox to configure the value H-Alignment [Left], [Center], [Right]
1

Configure Element Width

1. Configure Element Width
Select each UI Dynamic ComboBox to configure the element width [50%]
2

Configure Element Width

2. Configure Element Width
Select each UI Dynamic ComboBox to configure the element width [100px]
1

Click Button "Span"

1. Click Button "Span"
Click button "Span" to configure the element H-Alignment
1

Open Data Configuration

1. Open Data Configuration
Select UI Dynamic ComboBox with label "Item - Rating" and click on Data Config button to open dialog Key and Value Configuration
1

Enter Text

1. Enter Text
On textarea Value Configuration Script enter the following line to display a label plus the name and rating of the product item: "Item - Rating: " + obj.name + " - " + obj.rating;
 
1

Drag&Drop Attribute from Data TAB

1. Drag&Drop Attribute from Data TAB
Drag&Drop attribute "issueMapingList" from Data TAB into first free span of second row  to open dialog "Select Component" to add the corresponding UI Dynamic ComboBox to the UI page
2

Map BO "issueMapping"

2. Map BO "issueMapping"
Select UI Dynamic Combobox and open TAB "Implementation", SubTAB "Data Mapping" and map BO "issueMapping" into property "Single Selection"
1

Drag&Drop Attribute from TAB "Data"

1. Drag&Drop Attribute from TAB "Data"
Drag&Drop other attributes from TAB "Data" into second span to open dialog "Select Component" to add the corresponding UI Dynamic ComboBox to the UI page.
1

Drag&Drop Attribute from TAB "Data"

1. Drag&Drop Attribute from TAB "Data"
Drag&Drop attribute "ocean" from TAB "Data" into second span to open dialog "Select Component" to add the corresponding UI Dynamic ComboBox to the UI page.
1

Drag&Drop Attribute from TAB "Data"

1. Drag&Drop Attribute from TAB "Data"
Drag&Drop BO "continent" from TAB "Data" into second span to open dialog "Select Component" to add the corresponding UI Dynamic ComboBox to the UI page.
1

Drag&Drop from palette

1. Drag&Drop from palette
Drag&Drop attribute "albumList" from Data TAB into first free span to open dialog "Select Component" to add the corresponding UI Dynamic ComboBox to the UI page.
1

Drag&Drop Attribute from TAB "Data"

1. Drag&Drop Attribute from TAB "Data"
Drag&Drop other attributes from TAB "Data" into second span to open dialog "Select Component" to add the corresponding UI Dynamic ComboBox to the UI page.
1

Select UI Element

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

Select Event Type

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

Enter Action Script

3. Enter Action Script
Enter action script for the selected event type
4

Event Action

4. Event Action
The event action will display at the right side of the element.
1

Select UI Element

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

Select Event Type

2. Select Event Type
Select event type "onClick", "onBlur", "onChange"
3

Enter Action Script

3. Enter Action Script
Enter action script for the selected event type
4

Event Action

4. Event Action
The event action will display on the right of the UI Element.
1

Select UI Element

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

Select Event Type

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

Enter Action & Validation Script

3. Enter Action & Validation Script
Enter action & validation script for the selected event type
4

Event Action

4. Event Action
The event action will display at the right side of the element.
 
1

Select UI Element

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

Select Event Type

2. Select Event Type
Select event type "onBlur", "onChange"
3

Enter Action & Validation Script

3. Enter Action & Validation Script
Enter action & validation script for the selected event type
4

Event Action

4. Event Action
The event action will display at the right side of the element.
 
 
1

Drag&Drop Attribute from TAB "Data"

1. Drag&Drop Attribute from TAB "Data"
Drag&Drop attribute "toggleVisibility" from TAB "Data" into third free span 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"
1

Specify "Single selection"

1. Specify "Single selection"
Select each UI Dynamic ComboBox and open TAB "Implementation" SubTab "Data Mapping" to map BO "Instrument" on field "Single selection"