Professional Documents
Culture Documents
Matthias Weidlich
Agenda
Context Concept usage of contexts general structure context properties supply functions and context programming Data Flows in a Web Dynpro Application overview data binding context mapping model binding model import connection to model at runtime In a Nutshell References
each context has a root node, underneath the data fields are stored
Subnode
name cardinality selection singleton modelClass
"consists of
consists of
Node Attribute
name readOnly
boat_ID b2 b3
Controller
Green
s5
12.06.
13.06.
b3 Red
Sailor
can be mapped to
Element in Runtime
cardinality = 1..1
0:1 Node
cardinality = 0..1
cardinality is specified 1..n 1:n Node via min appearance .. cardinality = 1..n List of Node max appearance: 0..n Elements 0:n Node (0)1..1: the node cardinality = 0..n contains only one element instance which has (not) to be instantiated 0(1)..n: the node can contain multiple element instances (at least one) leadSelection marks one element in an element list
HPI, Seminar System Modeling - SS2005 / 6
Boat
State
Controller
Green
s5
12.06.
13.06.
b3 Red
Sailor
typed APIs
typed APIs are automatically created for statically defined context elements method signatures contain the corresponding object types use interfaces that are derived from the global interfaces, e.g. IContextNode, I<NodeName>Node
data binding: link between view layout and view controller context context mapping: link between two global controller contexts or between global controller
to presentation server
Custom Controller
context and view controller context model binding: link between global controller context and Web Dynpro Model
data binding: link between view layout and view controller context 1: context element that has not been bound
Custom Controller
properties of the user interface elements can be bound to attributes respectively nodes of a view context context attributes have to be Java Dictionary Types, as Java Native Types cannot be bound any user changes to the UI element properties in the view are immediately visible in the context as the same data storage is assigned, no data transport is necessary if the UI element property is a field of values (e.g. a table), the bound node has to be a multiple node (cardinality = 0/1 . . n) is a single value bound to an attribute of a multiple node, leadSelection marks the value to show
HPI, Seminar System Modeling - SS2005 / 12
context mapping: link between two global controller contexts or between global controller context and view controller context
Custom Controller
1, 2: context element that has not been mapped 3, 4, 5, 6: context element that has been mapped
locally defined attributes are only visible for the corresponding controller
Value Node
mapped attributes are visible at both ends of the mapping again: the same data storage is assigned, no data transport is necessary constraint: attribute 1 can only be mapped on attribute 2, if one of the parent nodes of attribute 1 is mapped on one of the parent nodes of attribute 2
consists of
is mapped to is mapped to
consists of
is mapped to
HPI, Seminar System Modeling - SS2005 / 14
mapping is a directive relation: direction is irrelevant for data changes changes of the mapping have to be done at the context where it starts a usage relation between two controllers is a precondition for context mapping multiple mapping creates data chains between multiple contexts
HPI, Seminar System Modeling - SS2005 / 15
model binding: link between global controller context and Web Dynpro Model 1: model element that has not been bound
Custom Controller
2: context element that has not been bound 3, 4, 5: context element / model element that has been bound
Model Class
name
all model classes have to implement the Common Model Interface (CMI) CMI affects data management and event handling access to CMI classes: with generic methods with typed getter- and setter methods
HPI, Seminar System Modeling - SS2005 / 17
consists of
Model Property
name type
Model Attribute
constraint: a context model attribute can only be mapped on a model attribute, if one of the parent nodes of the context model attribute is mapped on one of the parent classes of the model attribute
HPI, Seminar System Modeling - SS2005 / 18
Model Agent
Import Wizard
RFC Model
Model Data
supported model types: UML Web Dynpro Model in the XMI format webservice description as WSDL Java Bean model Remote Function Call (RFC) model import wizard generates the classes out of the model
Backend Data
Model Agent
Webservice Provider
(SOAP)
Backend Data
Backend Data
Model Data
J2EE based Web Dynpro Runtime communication: to webservice via SOAP to J2EE backend server via Remote Method Invocation (RMI) to ABAP backend server by using the SAP Java Connector (SAP JCo)
SAP JCo is a middleware component that supports ABAP calls JAVA and JAVA calls ABAP
HPI, Seminar System Modeling - SS2005 / 20
(SOAP)
Backend Data
Model Agent
R
Backend Data
Model Data
ABAP based Web Dynpro Runtime communication: again: to webservice via SOAP to ABAP backend server directly by calling RFCs and BAPIs
access to SAP Business Objects is gained by standardized methods: Business Application Programming Interfaces (BAPIs) Remote Function Calls (RFCs) are a SAP standard for communication between applications on SAP systems as well as non-SAP systems
In a Nutshell
contexts are the main concept for data management in Web Dynpro a context is a data model data flows in Web Dynpro: data binding links properties of user interface elements and context attributes context mapping links context elements model binding links context elements and elements of the model
References
Web Dynpro Overview, McNulty, SAP AG, 2003 Creating your first Web Dynpro Application, SAP Online Help, SAP AG 2004 Creating an Email client using Web Dynpro, SAP Online Help, SAP AG 2004 Java-Programmierung mit dem SAP Web Application Server, Kessler, Tillert, Dobrikov, Galileo Press, Bonn 2005 Introduction to Web Dynpro, SAP Developer Network, www.sdn.sap.com Web Dynpro Architecture, SAP Library, www.help.sap.com Business Application Programming Interfaces, tse - technologieberatung und systementwicklung, Hamburg 2005, http://www.tsehamburg.de/Papers/SAP/sapBAPI.html SAP BAPI und SAP JCo, Horn, 2005, http://www.torstenhorn.de/techdocs/sap-bapi.htm Application Server, Web Application Server, Web Services, SOAP, Java, Horn, 2005, http://www.torsten-horn.de/techdocs/applicationserver.htm Wiederverwendbare Software (Web Dynpro), Tillert, 2004, www.sap.info The new face of SAP - Web Dynpro, Winkler, 2004, http://www.oio.de/webdynpro-the-new-sap-face.htm