Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8065

Re: Is there a way for assistance class to get reference of wda and control it’s view

$
0
0

Hi Geeta,

 

You can get the reference of the component controller by its interface and call interface methods to interact with View.

 

For example, you can trigger events that can be caught by the view's event listeners.

 

But you cannot access view's api directly.

 

 

Similarly you can use WDDOMODIFYVIEW to pass VIEW as IF_WD_VIEW to your application controller. Then you might be able to manipulate the view.

 

Let me know if you find out how...

 

 

WDDOINIT of the componentcontroller

  z_cl_hrpso_wd_assist_main=>add_comp_controller( io_object = wd_this ).

 

 

This is the method I use to call refresh in all instances of the component.

 

METHOD add_comp_controller.

   "by passing the reference of the interface controller.

 

   DATA: lo_wd_component_interface TYPE REF TO ZIWCI__XXXX_REGION_SEL.

   lo_wd_component_interface ?= io_object.

 

   READ TABLE t_comp_controller WITH KEY table_line = lo_wd_component_interface TRANSPORTING NO FIELDS.

   IF sy-subrc NE 0.

     APPEND lo_wd_component_interface TO t_comp_controller.

   ENDIF.

ENDMETHOD.

 

METHOD refresh_all_comp_controllers.

   DATA lo_object TYPE REF TO object.

   DATA: lo_wd_component_interface TYPE REF TO ziwci__XXXX_region_sel.

 

   LOOP AT t_comp_controller INTO lo_object.

     lo_wd_component_interface ?= lo_object.

     CALL METHOD lo_wd_component_interface->global_refresh( ) .

   ENDLOOP.

 

ENDMETHOD.

 

 

Cheers

Emre


Viewing all articles
Browse latest Browse all 8065

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>