on 01-02-2014 9:10 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Harsh,,
I don't want only to clear value from selection screen .
Actually I m sending value from Main view to second view . And coming back to Main view through Back button using plug.
Second time when i m giving input for second view data is previous one. But when I m using F5 from the keyboard its working fine.
Please help me to achieve F5 functionality though action.
Hi,
Second time when i m giving input for second view data is previous one. But when I m using F5 from the keyboard its working fine.
How you are setting the data in the second view? Are you passing the data via plugs and reading it in second view? Or are you setting the data in WDDOINIT method of Second view?
For this scenario instead of using exit plug and reloading the entire application, use invalidate( ) method if your data is shared across the node in component controller.
If you are reading the the data from first view and based on that setting the data to second view in WDDOINIT method,
-> Just goto properties tab of second view and change the lifetime property to 'When visible' . (OR)
-> Move your DOINIT code to the HANDLE<IN_PLUG> method of second view. ( IN_PLUG is the inbound plug name of second view)
Hope this helps u,
Regards,
Kiran
Hi Bhagat,
Using exit plug you can achieve your requirement as below
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.