cancel
Showing results for 
Search instead for 
Did you mean: 

How to set a variable in portal session using web dynpro java.

Former Member
0 Kudos

Hi,

I have created a web dynpro application, which is running inside portal. I have created a role called "R1". Inside role R1, i have created 3 workset W1, W2 and W3. and inside each workset i have some pages and iviews.

My requirement is when user logins to the portal , and when he clicks on role R1 for the first time, a login page should come (so that we can do revalidation), and when he enters his password again in that login page , then only workset W1, W2 and W3 should be visible/accessible to him and after successful revalidation, if he clicks again on role R1, in that particular portal session, than that login page should not come.

for this, i thought i will set a variable in portal session, whenever user successfully revalidated himself, and if after successful revalidation he clicks again on role R1, i will check in doinit method of webdynpro whether variable is set or not (which i already set on successful revalidation), and if it is set then i will do Donavigation else i will present login page to the user.

Can anyone tells me how to set a variable in portal session using web dynpro java.

thanks

Arush

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Try this:

WDScopeUtil.put(WDScopeType.CLIENTSESSION_SCOPE, key, value) 
WDScopeUtil.get(WDScopeType.CLIENTSESSION_SCOPE, key) 

Ex:

WDScopeUtil.put(WDScopeType.CLIENTSESSION_SCOPE,"Key1","Value1");
String value1=WDScopeUtil.get(WDScopeType.CLIENTSESSION_SCOPE,"Key1").toString();

/people/william.cui/blog/2007/02/12/sharing-session-context-between-parent-and-external-windows-running-on-same-host

Regards,

Charan

Former Member
0 Kudos

thanks Charan, your solution helped me a lot !!!