cancel
Showing results for 
Search instead for 
Did you mean: 

WD ABAP: Flash island not getting refreshed

zsc
Explorer
0 Kudos

Hi Gurus,

I have a WDA Component with a main view having a drop down(by index) and a View Container. View Container has in turn another view having Flash Island UI element.

Data is flowing from Component Controller Context and required Context nodes are mapped to both the views.

The problem is data in the Flash Island view is not getting refreshed based on the selection in the drop down. All Context Nodes are getting updated including the ones bound with data sources for Flash island. But still, on-screen there is no change in table values in flash island on drop down selection.

BTW, the value changes in flash island if I pass hard coded parameters. Am I missing anything here?

I really dont want to look into flash code as there does not seem to be any issue. Also, there is no option to fire plug from main view to flash island view. What other options do I have to refresh data in flash island view?

Thanks much.. Help answers will be awarded with points...

Accepted Solutions (1)

Accepted Solutions (1)

ramakrishnappa
Active Contributor
0 Kudos

Shetulkumar Chothani wrote:

BTW, the value changes in flash island if I pass hard coded parameters. Am I missing anything here?

Hi,

As you are saying that the value of flash changes once pass the hard coded parameters. It seems that there is an issue in binding data to data source of flash island.

I suggest you to check in debugging by setting the values of data source, upon selecting a value from drop down list. So, that you can see that if you pass changed values to data source, the flash gets the latest from context node.

Hope this might help you.

Regards,

Rama

zsc
Explorer
0 Kudos

The Data Sources of the Flash island view are bound to the Context of that view which intern is mapped to component controller context. I am updating component controller context nodes on DropDown Selection.

Any idea, what else needs to be done or what else can I check?

ramakrishnappa
Active Contributor
0 Kudos

Hi,

You can try the below steps

  • Create an attribute GV_DATA_CHANGED of type WDY_BOOLEAN in component controller
  • On action of selecting a drop down list value, set the flag

               wd_comp_controller->gv_data_changed = abap_true.

  •      Go to method WDDOMODIFYVIEW( ) flash island's view and write the below code

  IF wd_comp_controller->gv_data_changed EQ abap_true.


    DATA lo_flash TYPE REF TO cl_wd_flash_island.
 

     lo_flash ?= view->get_root_element( ).


    IF lo_flash IS BOUND.
      lo_flash->raise_changed( ).
    ENDIF.

    

     "reset the flag

     wd_comp_controller->gv_data_changed = abap_false.
  ENDIF.

Hope this helps you.

Regards,

Rama

zsc
Explorer
0 Kudos

Hi Ramakrishna,

Thanks for quick response...

However, putting this code in WDMODIFYVIEW( ) gives error.

I do not see any method like raise_changed( ) in cl_wd_flash_island.

Thanks...

ramakrishnappa
Active Contributor
0 Kudos

Hi,

I think, you are at NW 7.0 series system. Hence your system is not having RAISE_CHANGED( ) of ui element. ( I can see in NW 7.31 )

I hope resetting the view would help you.

You can try the below code,


IF wd_comp_controller->gv_data_changed EQ abap_true.


    view->reset_view( ).

   

     "reset the flag

     wd_comp_controller->gv_data_changed = abap_false.
  ENDIF.

Hope this helps you.

Regards,

Rama

zsc
Explorer
0 Kudos

Hi Rama,

Thanks much for the prompt response... It really helped... The data on screen is now getting refreshed with new values.

One surprising thing... whenever, I change values in the drop down, the "on select" event handler and so the action method is called twice. This was happening even before which I was not able to figure out. Because of this, WD MODIFY VIEW also gets called twice and so when I change the values in dropdown, you can see the screen view getting refreshed two times. Its looking wierd.

Will you be able to help?

ramakrishnappa
Active Contributor
0 Kudos

Hi,

I think, somewhere the event handler method is getting called.

Please check the code inside the event handler method

Also, try setting break point in event handler method and you can find out the method which is triggering second time by using call trace of debugger window as below

Hope this helps you identify the issue.

Regards,

Rama

zsc
Explorer
0 Kudos

Thats perfectly true...

Event Handler is getting called twice. IF_WDR_VIEW_DELEGATE~wd_invoke_event_handler is called twice. I am not sure why?

Attaching the Call Stack here for First and Second call.

Rama, do you see anything unusual? Please help...

ramakrishnappa
Active Contributor
0 Kudos

Hi,

The call stack looks fine.

Hope you are not using timer ui element to refresh the screen

If so, please check.

Regards,

Rama

zsc
Explorer
0 Kudos

Hi Rama,

This seems to be known issue with WDA Unified Rendering. Just FYI: here are some SAP Notes:

1411235 - Unified rendering corrections up to SAP_BASIS 701/06 I

1461842 - Corrections for unified rendering up to SAP_BASIS 701/6 XI

Thanks,

Shetul

ramakrishnappa
Active Contributor
0 Kudos

Okay, thats good.

Hope your issue of eventhandler method call is resolved with these notes.

Regards,

Rama

Answers (0)