cancel
Showing results for 
Search instead for 
Did you mean: 

Web Dynpro Methods

Former Member
0 Kudos

Can someone please clarify in what order the following methods will execute and what initiates the execution of each method?

wdDoInit

wdDoModifyView

supplyResources (based on a supplyFunction defined in the context value node)

onPlugFromSearchViewToPage1 (based on an inbound plug)

Thanks, Scott K

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Shubhadip,

Thank you for the detailed explanation about how each method is initiated. I appreciate it!

I'm still not clear in what order they would execute. Let's assume that the user clicks a button on a search view that then populates a results view on the screen.

Within the results view, if all four methods are executed, in which order are they executed? (Does wdDoInit or onPlugFromSearchViewToPage1 execute first? When does supplyResources execute in relation to the others? Does wdDoModifyView execute last?)

Thanks, Scott K

Former Member
0 Kudos

In your case say the user clicks on a button on the same view:

wdDoInit() will NOT be executed as that was already executed when the view first came to the user

onPlugFromSearchViewToPage1: will NOT be executed unless you are redirecting your control from SearchView to Page1. Well - if this button click actually fires a navigation from Search View to Page 1 then this method will be executed otherwise not.

supplyResources: might be executed if you change any data of the context node with which this supply function is attached.

wdDoModifyVIew: will be executed after the button hit - just before the view is getting re-thrown back to the user.

Do one thing - if you want to understand which methods are getting executed and in which order - please put a message in each of them saying "Now executing <this> method". Replace the <this> with method name. Then on screen you will see when which one executing and their order of execution.

You can print this message by

wdComponentAPI.getMessageManager().reportSuccess("your message");

Put this code into all the four methods you are concerned with and then run the application.... you should understand yourself.

Regards,

Shubhadip

Former Member
0 Kudos

wdDoInit: First time when you launch your application or refresh the whole browser window. It will be called only one time (first time) for the whole application life span.

wdDoModifyView: Will be called for each view each time the view is going to be displayed. Its called just before the view is thrown back to the user.

supplyResources (based on a supplyFunction defined in the context value node): When the event upon which this supplu function is created is fired.

onPlugFromSearchViewToPage1 (based on an inbound plug): When the plug will fire from the source view. Might be some button press or link click or some event has to happen in the source view when this plug will be fired to come to your current view. Immediately after the plug fies in the source view your onPlug... method would be called.

Regards,

Shubhadip