Chinaunix首页 | 论坛 | 博客
  • 博客访问: 150324
  • 博文数量: 54
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 508
  • 用 户 组: 普通用户
  • 注册时间: 2013-09-18 09:25
个人简介

好男人就是我,我就是你兵哥

文章分类

全部博文(54)

我的朋友

分类: Web开发

2015-08-04 16:34:21



  • That is not the proper way of doing it. You should implement the following methods in your overview page view controller class

    • DETACH_STATIC_OVW_VIEWS
    • REATTACH_STATIC_OVW_VIEWS

    You may refer the methods in the class CL_PROD_PHA_PRODPHARMAEXT_IMPL. This is the case to dynamically add/remove views once the page is loaded.

    But incase, if you know the condition even before the page is loaded, you should create to different configurations in the overview page each with one of the 2 views you have mentioned, and in the DO_CONFIG_DETERMINATION method, you can determinne which configuration to be loaded based on the condition.


    • Assign both views to this viewarea in Runtime Repository. Make on of it as a default.

      Then in view conroller (_IMPL class) of you viewset in DO_PREPARE_OUTPUT make the following:

      1. DATA: lt_children TYPE tbsp_wd_rep_views.  
      2.    DATA: lr_rview TYPE REF TO cl_bsp_wd_rep_view.  
      3.     DATA: lv_desired_viewname TYPE string.  
      4. ****  
      5. * here should be some logic to fill in lv_desired_viewname according to your needs  
      6. *****   lt_children = me->rep_view->get_all_children( iv_viewarea = 'ViewAreaA' ). "put your viewarea name here instead of ViewAreaA  
      7.      LOOP AT lt_children INTO lr_rview.  
      8.        IF lr_rview->get_name( ) CS lv_desired_viewname. "here you're looking for desired view  
      9.          me->bind_view( rep_view = lr_rview viewarea = 'ViewAreaA' ). "put your viewarea name here instead of ViewAreaA  
      10.          EXIT.  
      11.        ENDIF.  
      12. ENDLOOP  .  


阅读(656) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~