xAPPnow LOW CODE PLATFORM - User Manual 

Still no account yet?

×

UI Element - Heading

 
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 Heading.
 
 
 
 
TAB "Element Properties"
 
The TAB "Element Properties" contains the configuration for
 
  • value horizontal alignment (left, center, right)
     
     
 
 
 
 
 
TAB "Data Mapping"
 
The TAB "Data Mapping" contains the attribute type related mapping of the UI element
 
  • enum value
  • enum
  • string
  • integer
  • float
 
 
 
 
 
 
TAB "Events"
 
The TAB "Events" contains the events and related "Action" and "Validation" scripts of the UI element.
 
  • onClick
  • onDoubleClick
     
    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.
     
  • 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 "Heading"
 
  • 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 "Heading" 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_Heading" 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 UI Heading 1 from palette into free span on the left
 
 
 
UI Element - Heading
 
 
  • Step 2: Repeat Step 2 and add UI Heading 1 H-Aligment in center and right spans
     
     
 
UI Element - Heading
 
 
  • Step 3: Open TAB "Implementation",  SubTab "Element Properties" and select each UI Heading 1 to configure the value H-Alignment [Left], [Center], [Right]
 
 
 
UI Element - Heading
 
 
Exercise 3: TAB "Data Mapping"
 
  • Step 1: Drag&Drop a UI Heading from palette into second free span and keep it selected.
  • Step 2: Open TAB "Implementation" SubTab "Data Mapping" and then SubTAB Definition Objects.
  • Step 3: Type the word "gender" on field "Search data" to locate the corresponding enum value
  • Step 4: Drag&Drop the enum value "MALE" to "Data Mapping" field to map the Label with the enum value.
 
 
 
UI Element - Heading
 
 
 
  • Step 5: Drag&Drop attribute "person.gender" from TAB "Data" into free span below the one of Step 1, and select Heading 5 in dialog "Select Component" and uncheck the Create Label option, to add the corresponding UI Heading to the UI page.
 
 
 
 
 
 
 
  • Step 6: Repeat Step 5 and add Heading for attributes
  •  "person.name"
  •  "person.age"
  •  "person.height"
     
     
     
     
UI Element - Heading
 
 
 
 
Exercise 4: TAB "Events" - Action Scripts
 
  • Step 1: Select the UI Heading and open TAB "Implementation" SubTab "Events" to specify event type "onClick"
  • Step 2: 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 - Heading
 
 
 
 
 
  • 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 "onDoubleClick"
localData.eventType.onDoubleClick = globalDef.enums.Tutorial.UIM.DEF.EventMessage.ON_DOUBLE_CLICK;
                       
 
 
UI Element - Heading
 
 
Exercise 5: TAB "Events" - Action & Validation Scripts
 
  • Step 1: Select the UI Heading with text "Click here..." in section Events (Action & Validation Scripts) 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 - Heading
 
 
 
  • 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 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;
 
 
  • validation script
  • "onDoubleClick" event
localData.eventType.isValid
 
 
 
 
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 - Heading
 
 
 
  • Step 2: Select the UI Heading and open TAB "Implementation" SubTab "Visibility"
  • Step 3: Click at visibility type "Visible" and select state "Script"
  • Step 4: Implement the visibility script, which toggles the visibility "visible" and "invisible"
 
localData.toggleVisibility;
 
 
UI Element - Heading
 
 
 
Exercise 7: Set UI Page as submodel of the Frontend Service Model
 
  • Step 1: Open frontend service model  "Automation/Service/Training/UIM/Exercise/Basic/Heading"
  • Step 2: Select UI page "View Heading" to open TAB "General", SubTAB "Element"
  • Step 3: Click button “Search“ to open dialog "Select or Create Submodel" and select UI page "Heading" with double click
     
     
     
     
  • Step 4: Right click on button flow to set label with "Exit" flow.
 
 
 
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 Element from Palette

1. Drag&Drop Element from Palette
 
1

Drag&Drop Elements from palette

1. Drag&Drop Elements from palette
 
1

Configure H-Alignment

1. Configure H-Alignment
 
1

Select UI Element

1. Select UI Element
2

Open SubTAB "Definition Objects"

2. Open SubTAB "Definition Objects"
3

Search for Enum "Gender"

3. Search for Enum "Gender"
4

Drag&Drop Enum Value

4. Drag&Drop Enum Value
 
1

Drag&Drop from TAB "Data"

1. Drag&Drop from TAB "Data"
 
1

Select UI Element

1. Select UI Element
2

Select Event Type

2. Select Event Type
3

Enter Action Script

3. Enter Action Script
4

Event Action

4. Event Action
The event action is displayed at the right side of the corresponding UI element
1

Select UI Element

1. Select UI Element
2

Select Event Type

2. Select Event Type
3

Enter Action Script

3. Enter Action Script
4

Event Action

4. Event Action
The event action is displayed at the right side of the corresponding UI element
1

Select UI Element

1. Select UI Element
2

Select Event Type

2. Select Event Type
3

Enter Action&Validation Scripts

3. Enter Action&Validation Scripts
4

Event Action

4. Event Action
The event action is displayed at the right side of the corresponding UI element
1

Drag&Drop Attribute from TAB "Data"

1. Drag&Drop Attribute from TAB "Data"
1

Select UI Element

1. Select UI Element
2

Select Visibility Property

2. Select Visibility Property
3

Enter Script

3. Enter Script