context mapping and data binding

来源:互联网 发布:网络教育报考时间 编辑:程序博客网 时间:2024/06/09 14:25

Controllers are the heart of Web Dynpro components, since program logic and
data are defined in these entities

 

Each view consists of the layout part and exactly one view controller. This
controller cares for view-specific flow logic, like checking user input and
handling user actions.

 

For information to be shared between different controllers, one controller must
declare the use of another controller. This is done on the Properties tab of the
controller that needs to access another controlle

 

Using the generic name <Outbound plug> for an outbound plug, its declaration
will cause a method to be generated in the view’s component controller, called
FIRE_<Outbound plug>_PLG,A static registration of an inbound plug (method HANDLE<Inbound plug>) to
the navigation event raised by an outbound plug (method FIRE_<Outbound
plug>_PLG) is called a navigation link.

 

实例:两个视图,一个包含一个button,一个form,含有两个输入字段。

                       一个同样含有一个button,一个form,含有两个输入字段,但属性为READ ONLY,内容为视图1输入的值。

        点击视图1的按钮,跳转到视图2,点击视图2的按钮,跳回视图1.

点击Next后为:

 

1,两个视图与上一篇的例子一致,在comopenent context里新建一个node,参考数据表sflight,选择字段carrid,connid作为添加的属 性。

2,分别在两个视图的context里做MAPPING.

3,在视图1,2 layout里增加一个form,context选择刚才创建的节点,binding的复选框勾中。form的属性LAYout,选择MATRIX layout

   视图2里的form里的输入字段属性设置为READ ONLY。

4,navigation link创建不变,创建application,active。

5,测试的结果如上图。

原创粉丝点击