cancel
Showing results for 
Search instead for 
Did you mean: 

how to use the com.sap.tc.webdynpro.progmodel.api.IWDView?

Former Member
0 Kudos

hi,

In every view, the "com.sap.tc.webdynpro.progmodel.api.IWDView view" is the parameter of the mothed wdDoModifyView(). I wonder, if we can make type com.sap.tc.webdynpro.progmodel.api.IWDView parameter in other methods which are designed by ourself.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

HI Daniel,

U posted many threads with same query. So please close all other threads.

If ur doubt is cleared, close this thred also by rewarding points.

Regards

Fahad Hamsa

Former Member
0 Kudos

Hi,

If u want to create ur own IWDView variable, create a static global declaration (inside //@@begin others //@@end at bottom) as

static IWDView myView;

and in wdDoModifyView()

if(firstTime)

myView=view;

Now myView variable will be available in all ur view methods.

But I think this method violates the principles, so always do as Armin suggested

Regards

Fahad Hamsa

Former Member
0 Kudos

NO! Don't ever do this, it will not work.

Armin

Former Member
0 Kudos

Access to the view is only possible in a certain phase of the request-response cycle, which is implemented by the static method wdDoModifyView(). This means, access to the view is only possible inside wdDoModifyView() or static methods called from there.

Armin