cancel
Showing results for 
Search instead for 
Did you mean: 

WDClientUser.forceLogoffClientUser(url) not working

jeroen_verbrugge2
Active Participant
0 Kudos

Hello,

We're using WDClientUser.forceLogoffClientUser(url); in method for action for a dropdown box to select language.

In one portal it works, in another it does not. I see that the locale parameter at the end of the url is changed when selection languange in dropdown (example : ?sap-locale=fr to ?sap-locale=de) but the page itself is not reloaded with new language.

When copying the url and pasting it into a new session it works.

So I assume it's not an application problem but a portal session problem.

Any ideas?

Thanks,

Jeroen.

This is the code:

private final void changeLocale(final String locale) 
	{
		try
		{
		  /* Generate new URL for current application with locale arg */
			final String url = WDURLGenerator.getApplicationURL
			(
				wdComponentAPI.getApplication().getDeployableObjectPart(),
				java.util.Collections.singletonMap("sap-locale", locale)    
			);
			/* TO DISCUSS */
			/* Log-off current session and start new one (with new locale)*/
			WDClientUser.forceLogoffClientUser(url);
		}
		catch (final WDURLException ex)
		{
			wdComponentAPI.getMessageManager().reportException
	  		(
		 		new com.sap.tc.webdynpro.services.exceptions.WDNonFatalException(ex), false
	   		);
	    }
	}

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Jeroen,

Try to Invalidate the httpsession based on the logic, please find below thread on the same issue:-

Hope this may help you.

Deepak!!!

Former Member
0 Kudos

Hi Jeroen,

I´ve been trying your code but when i call the forceLogoffClientUser method I got an error like this

The Web Dynpro Application 'MyApp' has expired. Restart the application using the Refresh button or via the following link MyApp.

On this [thread |;I give more detail of what I need to do I what I tried so far.

If you give any ideas to archive my goal I´ll appreciate it.

Regards,

Orlando Covault

Former Member
0 Kudos

Hi,

yes it is not an application problem. problem with portal session.

Regards,

Sunaina Reddy T