Web Dynpro for ABAP(1):Web Dynpro结构


Web Dynpro for ABAP

1Web Dynpro结构

Web Dynpro Component:View,Web Dynpro Window,Controller。

 Web Component可以嵌入其他Web Component

1.1View

每个Web Dynpro Application至少有一个View;

View中可以嵌入多种Element视图元素;

View拥有自己的Context,Controller。Context用来存储页面使用者看到和交互使用的数据。

View Set,多个View嵌入虚拟Layout

Plugs and Navigation Links

View之间跳转使用Plugs;

Plugs分为inbound and outbound plugs

1.2Web Dynpro Window

Window至少包含一个View;

View之间通过Navigation Link跳转;

Interface View

Window可以连结到Web Dynpro application,所以Window可以通过URL调用访问到。

1.3 Controller

Controllers are the active parts of a Web Dynpro application;

View Controller处理用户在View上的动作;

View Context包含View上的数据;

Web Dynpro Component Controller结构:

Interface Controller每个Web Dynpro Component只有一个;

Controller控制逻辑位置:Event Handler,Methods,Supply Functions;

Context: The data used in the component or in the view is stored in the context;

Context结构:

Context参数:Cardinality

Cardinality

Meaning

1:1

The node contains only one element instance, which is instantiated automatically.

0:1

The node contains only one element instance, which must not be instantiated.

1:n

The node can contain multiple element instances, of which at least one must always be instantiated (and is instantiated automatically).

0:n

The node can contain multiple element instances, of which none have to be instantiated.

Context参数:lead selection;

Context参数:Automatic/Manual Initialization;

Context参数:Singleton Property

Data Binding and Mapping

1.Component Controller的Context可以映射到View的Context;

2.Binding a UI Element to a Context Attribute;

Event

The component controller allows you to create events.

Inbound Plugs类似于Event;

Action

UI Element可以有自己Event;

1.4 Interfaces of Web Dynpro Components

1.5 Web Dynpro Application

2Web Dynpro Application Demo

Package:SWDP_DEMO_TUTORIALS