on 06-22-2009 5:23 AM
Hello All.
In my application i have 2 views. Say View1 and View2.
If i navigate from View1 to View2, i want to call view2's wddoinit method.
And if i navigate from view2 to view1 i have to call view1 wddoinit method.
To put it simple each time i go to a view i need to call that view's wddoinit method.
How to achieve this.
Regards,
SampathKumar.
Thank You All
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Just write call method wddoinit in the event handler method of the inbound plug in View 1.
WDDOINIT is called automatically when a controller is initialized for the first time.
But it is not advisable to call Hook methods explicitly,as they are handled by the framework directly.
Regards,
Runal
Edited by: Runal Singh on Jun 22, 2009 10:17 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This message was moderated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
For this scenario i suggest you use the eventhandler method created by the Inbound Plug.
This event handler of an inbound plug is always triggered when the view is called.
For eg: if you create an inbound plug for the view IP_MAIN, HANDLEIP_MAIN is created automatically.
You can place your code in here.
Hope this helps!
Regards,
Radhika Vadher.
- Create one new method on each of the view controllers, say mymethodv1 and mymethodv2. Move the code in WDDOINIT to those methods and call each method from each WDDOINIT method (so far the end result would be the same as you have now).
- Now call both new methods also from each of the inbound plug handler methods.
The plug handlers should be the place where you execute code upon navigation. If that code must be the same that you execute in WDDOINIT, then isolate it on a separate method and reuse it from both places...
As it was stated, hook methods (WD*) should NOT be called explicitly.
Regards
Hi,
Invalidate the attributes which are responsible for the i/p fields in View 1 before navigating to the VIEW 2.
do the same as above before navigating to the view1 from view2.
If all the attributes which are responsible for the i/p fields in View 1 are present under the same node then you can directly invalidate the node using the method.
IF_WD_CONTEXT_NODE->INVALIDATE( ).
Regards,
Kiran Kumar
On the View Properties tab change the Lifetype from Framework Controlled to When Visible. This will cause the WD Framework to destroy the view and all data of the view context whenever it is no longer visible. That way your WDDOINIT will fire on each return to the view as though it was the first load.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
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.