Skip to Content
avatar image
Former Member

How to reload a web dynpro application using action similar to f5 in browser

Hii Experts

I want to  Relaod Web dynpro component though button on view. Which should work similar to F5.

When ever user click on button entire application should reloaded.

I have created a button on view 'Refresh' and the action attached to it is 'onactionrefresh'.

Please help me what code should I write within actionrefresh. So that my application will reload.

I try many ways but not working like   wd_comp_controller->invalidate( ) .


node-> invlidate( )


I saw a note  using exit plug url but it was not clear.


Please help me its urgent                                                        

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Jan 02, 2014 at 09:47 AM

    Hi Dharmkrit,

    If what you require is to clear the values of fields on press of that button, then you can simply bind the values to space (' ') on press of the 'Refresh' button.

    Regards,

    Harsh Bansal

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Kiran Kumar Valluru

      Hi,

      Smart Approach.

      I am reading data from first view and in setting data in  WDDOINIT method of Second view .

      I ahve set the proprty of view a 'When visible'

      . Its working fine.

  • Jan 02, 2014 at 10:01 AM

    Hi Bhagat,

    Using exit plug you can achieve your requirement as below

    • Create an out bound plug REFRESH in your window as below & activate the window

             

    • Go to the view properties tab and click on create an entry for window controller as below

        

    • Now write the below code in your event handler method

    DATA lo_w_test_input_fld TYPE REF TO ig_w_test_input_fld .

    lo_w_test_input_fld =   wd_this->get_w_test_input_fld_ctr( ).

      lo_w_test_input_fld->fire_refresh_plg(

        url = 'ZWDA_DEMO_TEST_INPUT_FLD'                              " string

      ).

    Note:

              w_test_input_fld : is the window name ( Replace this with your window name )

              'ZWDA_DEMO_TEST_INPUT_FLD'  : is the application name( Replace this with your application name )

    Hope this resolves your issue.

    Regards,

    Rama

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Bhagat,

      This approach, exits the current application and it re-loads the application again.

      Hence it refreshes all the views and its context. ( considerably, you can notice the delay of loading application again )

      If you just want to clear some data on the view or whole context.

      You can use the method invalidate( ) of context node.

      You can reset the data of whole context by using method WD_CONTEXT->invalidate( ).

      Regards,

      Rama