Web app shows prevoius screen url during navigation to new screen

Web app shows prevoius screen url during navigation to new screen

  

Hi everyone,
I'm new to outsystems and trying to develop a WEB APP having login, registration, profile and edit profile screens and some more screens.
Now when i navigate from login screen to profile screen, the url in the browser says LoginScreen ( name of my login screen ), instead it should have shown Profile screen url ( name of profile screen ) . But the problem is only with url as the correct screen is displayed even though url reads wrong. So even though screens are working fine and in order, the urls are mismatched. How do I fix them?

In my Login screen , post successful login i gave give destination as Profile screen. So although the profile screen is displayed, the url in browser still reads loginscreen url.


I know it sounds weird but its happening.


Screenshots attached ( browser  and  respective screens ).   url highlighted with yellow

Studio version :  11
(windows)

Thank you

When you are redirecting to another webscreen (Profile), what way are you redirecting? Is it using  the destination web screen node or is it using the external URL of the profile screen?


Chetan Yewale wrote:

When you are redirecting to another webscreen (Profile), what way are you redirecting? Is it using  the destination web screen node or is it using the external URL of the profile screen?



it is using destination web screen :) 

screenshot of redirection is attached

Thanks

Solution

Thanks, I would suggest using the external URL node.

You can also pass simple parameters if required to external URL.


The simple explanation of why this happens is:

1. You have the Submit button on the Login screen. It must be having "Submit". So, such HTTP request will be form submitted by a POST request. 

2. Now, in the POST request you are redirecting the user using the destination webscreen.

3. The way you are redirecting is server side redirect.

4. So server side redirect takes you to the new screen but the URL does not change - because the client side redirect does not happen.


To ensure that the client side redirect also happens - use the External URL node. There you can construct the URL to the Profile screen dynamically and it will then also update the URL in the browser.

Let me know if it solves the problem.


Solution

Chetan Yewale wrote:

Thanks, I would suggest using the external URL node.

You can also pass simple parameters if required to external URL.


The simple explanation of why this happens is:

1. You have the Submit button on the Login screen. It must be having "Submit". So, such HTTP request will be form submitted by a POST request. 

2. Now, in the POST request you are redirecting the user using the destination webscreen.

3. The way you are redirecting is server side redirect.

4. So server side redirect takes you to the new screen but the URL does not change - because the client side redirect does not happen.


To ensure that the client side redirect also happens - use the External URL node. There you can construct the URL to the Profile screen dynamically and it will then also update the URL in the browser.

Let me know if it solves the problem.



Can you please review my screenshot   ( if its correct way to use  external node ).
Here i have tried to implement it in given screenshot.  Its working fine now. 

I have used external nodes whenever no args are being passed to the next screen.


I have noticed that whenever i  pass args,  the redirection is working fine from server side also.
But whenever there are no args, redirection problems occurs there.

Thanks for the wonderful solution . You saved my day.

Hey Anand,

I do not see the updated screenshot. 

However even I find it surprising by your observation - that with no args the redirection problem is coming.