on 08-13-2012 12:41 PM
Hi experts,
I'm new to webdynpro and created a test application. I have a problem with the initialization of the selected view..
From a navigation bar I call view MAIN1 of component COMP1. There I have a roadmap designed with displays information and activities based on the selected step. Lets say I chose step3 and get all information displayed. Now I chose another link from the navigation bar which calls view MAIN2 of component COMP2.
When navigating back to MAIN1 of COMP1 via the navigation link there is still step3 selected in MAIN1.
How can I initialize view MAIN1 again when it is called from the navigation bar?
When pressing F5 of the browser all views are resetted to initial state but how can I get this result during the navigation?
Thanks in advance.
RP
Hi Richard,
You can reset the view's context nodes to their initial state, which should have the same effect. See method:
if_wd_context_node->invalidate( ).
Using this method, you can reset individual nodes or, by using the view's wd_context attribute, reset all nodes of the view in one statement:
wd_context->invalidate( ).
When you navigate from view MAIN1 via the navigation link, you can use this method to reset the context nodes of the view to their initial state.
Cheers,
Amy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Richard,
"Can I also invalidate the context of a component which I maintained as used web dynpro component"
Provided the used component's context node is defined as an interface node, in the view which has the component usage defined, you can drag-and-drop the interface context node from the used component's context to the view's context. Then in a view method, you can read and invalidate that context node as if it were any other context node.
The screen captures below are from demo Web Dynpro Component WDT_COMPONENTUSAGE where context node NODE_INTERFACE has been mapped from a used component's context to the context of view MAINVIEW.
Cheers,
Amy
Hi Amy,
thanks for the hint with the interface node. I finally managed it
I put all attributes that can be invalidated when calling the view again into one interface node on context level, mapped it to the MAIN1 view and also to the navigation bar view and put the invalidate( ) code right before firing the outbound plug.
Thanks!
RP
Hi Richard,
As per the architecture in Web Dynpro ABAP, view will be initialized only once. In WDA, WDDOINIT() is used as initialization. This method triggers only once in its life time i.e., till the application is closed.
As per your recruitment: write logic in component controller method( eg: Refresh_data ). Call this method in the respective on the back navigation.
Sample code to be used before navigation:
wd_comp_controller->refresh_data( ).
wd_this->fire_to_view1_plg( ).
Note:
1. wd_comp_controller is the attribute which is used as instance or reference to access methods,data across the component globally
2. wd_this : is an attribute which is used as instance or reference, to call the methods of current controller
if you have any quires, you can reply with your quires
Thanks & Regards,
Sankar Gelivi.
;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Richard,
Check the below link.
http://sapignite.com/creating-roadmap-application-in-webdynpro-for-abap-tutorial/
Regards
Aravindan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.