Professional Documents
Culture Documents
Contents:
Introduction to UI elements Putting data on the screen: Context binding Controlling the behaviour of UI elements using context binding Using a basic composite UI element
What is a UI element?
A UI element is any graphical entity that occupies a position within a view layout.
Group UI Element
TextView UI Element
Label UI Element
InputField UI Element
SAP AG 2005, Title of Presentation / Speaker Name / #
The root node is always of type TransparentContainer, and is always called RootUIElementContainer. You cannot change this, it is hard coded!
Hard coded RootUIElementContainer
UI Element categories
Various categories of UI elements are supported
e.g. Button, InputField, Label Gantt, Network
OfficeControl
e.g. TransparentContainer, Tray MessageArea
Each UI element object is represented as an abstract class that is independent of any client presentation layer.
SAP AG 2005, Title of Presentation / Speaker Name / #
View Editor
2. The Layout view will be selected by default 3a. UI elements can be added by drag and drop from the toolbar
3b. In the hierarchical representation - UI elements can also be added by selecting Insert Element via context menu
UI Layout
Navigation Plugs
UI Layout
Actions
Navigation Plugs
Updates
Instance Methods
A hard coded UI element property value gives the UI element a fixed behaviour. This arrangement does not lend itself to good UI design and should be avoided!
SAP AG 2005, Title of Presentation / Speaker Name / #
1.A new attribute has been created that is of the correct data type to control the readOnly attribute
SAP AG 2005, Title of Presentation / Speaker Name / #
3.The value of the attribute can be set by default or in a appropriate method accessing the attribute during runtime
2.For the UI element are according data types available. The readOnly UI element property can be controlled by an attribute of type WDY_BOOLEAN ('X' == True, ' == False)
Binding UI element properties to suitable context attributes is a very much better, and more flexible technique for UI design.
UI element appearance
Available Properties
Possible UI Events
Composite Table UI Element. Child UI Elements. The TableColumn elements are also composite UI elements.
Each TableColumn UI Element has a Caption and TextView UI element as its children.
Context Metadata
Context Root FLIGHTS (c=0..n) BOOKINGS (c=0..n) BOOKID CUSTOMID CLASS PASSNAME CARRID
View layout The Table UI element must have its dataSource property bound to a context node of cardinality 0..n or 1..n Runtime
CONNID
FLDATE PRICE
Design Time
SAP AG 2005, Title of Presentation / Speaker Name / #
Context Metadata
Context Root FLIGHTS (c=0..n) BOOKINGS (c=0..n) BOOKID CUSTOMID CLASS PASSNAME CARRID
CONNID
FLDATE PRICE
View layout
Design Time
SAP AG 2005, Title of Presentation / Speaker Name / #
Runtime
Context Metadata
Context Root FLIGHTS (c=0..n) BOOKINGS (c=0..n) BOOKID CUSTOMID CLASS PASSNAME CARRID
CONNID
FLDATE PRICE
Design Time
SAP AG 2005, Title of Presentation / Speaker Name / #
Runtime
Context Root
Context Metadata
Context Root FLIGHTS (c=0..n) BOOKINGS (c=0..n) BOOKID CUSTOMID CLASS PASSNAME CARRID
Default Element
FLIGHTS
CARRID
CARRID 2 CONNID CARRID CONNID 1 CONNID FLDATE
..n
Runtime data
View layout Selecting a row on the screen causes the nodes lead selection to be altered
CONNID
FLDATE PRICE
Design Time
SAP AG 2005, Title of Presentation / Speaker Name / #
Runtime
Context Metadata
Context Root FLIGHTS (c=0..n) BOOKINGS (c=0..n) BOOKID CUSTOMID CLASS PASSNAME CARRID
View layout A nodes selection cardinality controls how many elements may be selected simultaneously within the element collection. 0..1 is the default.
CONNID
FLDATE PRICE
Design Time
SAP AG 2005, Title of Presentation / Speaker Name / #
Runtime
You should now be able to: The UI element concept How to put data on the screen through context binding Control the behaviour of UI elements using context binding The use of a basic composite UI element