cancel
Showing results for 
Search instead for 
Did you mean: 

Checking portal roles in WebDynpro

Former Member
0 Kudos

Hi,

I want to make some role checking in my WD and depending on the role I want to create the WD dynamically. I know how I can check the roles and also how to generate the WD dynamically, but I don't know where to do it.

In which method should I do the role checking and generating the WD dynamically?

public void wdDoInit()

OR

public static void wdDoModifyView(IPrivateComponentEDView wdThis, IPrivateComponentEDView.IContextNode wdContext, com.sap.tc.webdynpro.progmodel.api.IWDView view, boolean firstTime)

I think I should use the wdDoInit() method, but to generate the WD dynamically I need this parameter IWDView from the wdDoModifyView method. But I think it's not the right method for that...

So what should I do where?

Thanks in advance,

Hartmut

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hartmut,

Definitely, do this check in wdDoInit method.

Save the check result as context attribute value or context node elements, then later access aforementioned values/elements from variable wdContext that is passed to wdDoModifyView method.

Valery Silaev

SaM Solutions

http://www.sam-solutions.net

Answers (1)

Answers (1)

venkatakalyan_karanam
Active Contributor
0 Kudos

Hi Hartmut

You can use wdModify method with a condition,Means if you want to perform role check in doInitialization you can do.

To display dynamically

you can use firstTime parameter

like

if(firstTime)

{

//write your code that is executed only when the screnn is rendering for the firstTime

}

regards

kalyan