Skip to Content
avatar image
Former Member

Reloading the Entire Application

I have a web-dynpro Application with only 1 View. I am doing some database modifications and displaying some data. Now my requirement is when i click a button on the view the entire web dynpro application should get reloaded.

How can i achieve that ?

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

5 Answers

  • Best Answer
    avatar image
    Former Member
    May 29, 2009 at 10:01 AM

    HI Manjunath,

    We had a refresh button in our application in which we were loading the application again.

    To achieve this perform the following steps -

    1) In component controller create a wrapper method say - CALLINIT( ).

    2) in this method call method WDDOINIT( ).

    3) on click of Refresh button lets say the action is ONACTIONRELOADPAGE

    4 ) IN this method call the component controller method CALLINIT like

    wd_comp_controller->callinit( ).

    I've tested this by creating my own test application.

    Although calling hook methods is not advisable but it served the purpose for us and we able to reload the application with new set of data.

    Regards

    Manas Dua

    Edited by: Manas Dua on May 29, 2009 12:01 PM

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Manjunath,

      I debugged my own application and found that while calling component controller hook method like this

      do init of view is not getting called.

      In this scenario, the best way out as Thomas suggested could be to copy ur logic for fetching data in some other method and call it instead rather than calling hook methods.

      Regards

      Manas Dua

  • May 28, 2009 at 08:56 AM

    Hi Manjunath,

    Why do you want to reload .? other than this just call the method again where you are doing this data base modification in a refresh method .

    regards,

    Anil kumar G

    Add comment
    10|10000 characters needed characters exceeded

  • May 28, 2009 at 09:01 AM

    Hi Manjunath,

    My concern is some where you are doing some calculation to disply the data in tha page in the flow of when you reload the page. that must be in some method i guess. Call that method only directly on click of some refresh button which will do the same thing.

    regards,

    Anil kumar G

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Rohit Makkar

      Hi Rohit / Anil Kumar,

      If we do so, a new browser will get opened keeping the old one opened. I want the application to get reloaded in the same browser.

      Edited by: Manjunath CN on May 29, 2009 11:12 AM

  • May 28, 2009 at 09:21 AM

    Hi Manjunath,

    I have a solution but this code will open a new window may be usefull just check.

    data lo_window_manager type ref to if_wd_window_manager.

    data lo_api_component type ref to if_wd_component.

    data lo_window type ref to if_wd_window.lo_api_component = wd_comp_controller->wd_get_api( ).

    DATA: URL TYPE STRING.

    CL_WD_UTILITIES=>CONSTRUCT_WD_URL(

    EXPORTING

    APPLICATION_NAME = component name

    IMPORTING

    OUT_ABSOLUTE_URL = URL ).

    lo_window_manager = lo_api_component->get_window_manager( ).CALL METHOD lo_window_manager->CREATE_EXTERNAL_WINDOW

    EXPORTING

    URL = URL

    MODAL = ABAP_FALSE

    HAS_MENUBAR = ABAP_TRUE

    IS_RESIZABLE = ABAP_TRUE

    HAS_SCROLLBARS = ABAP_TRUE

    HAS_STATUSBAR = ABAP_TRUE

    HAS_TOOLBAR = ABAP_TRUE

    HAS_LOCATION = ABAP_TRUE

    RECEIVING

    WINDOW = lo_window.lo_window->open( ).

    Regards,

    Anil kumar G

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Anil,

      by calling the method create_external_url( ),the same application will be opened in a separate window(ofcourse with the new set of data), but guess that is not the solution Manju is looking at.

      Best Regards,

      Ashish Singhal.

  • avatar image
    Former Member
    May 29, 2009 at 07:39 AM

    Hi Manjunath,

    The easiest way to reload application with fresh data would be to call component controller hook method

    WDDOINIT.

    We also faced the same problem - we were filling data in comp controller init and displaying it to the user, when user updates the data at back end and refreshes the view only domodify method of view will

    be called, so no updated data was fetched. So to overcome this we simply called component controller

    hook method WDDOINIT from our view method handling that reload event.

    Hope this helps.

    Regards

    Manas Dua

    Add comment
    10|10000 characters needed characters exceeded