How to overwrite the returnUrl value in changePassword.jsp.

Posted by cSocaciu on 28-Mar-2016 07:20

We are using Rollbase private cloud 4.0.6.

I've made a custom page using the code below:

<p><a class="k-link" title="My Preferences" href="../setup/myPreferences.jsp?domain=userPref"><strong>MY PREFERENCES</strong></a><br /><span class="rbs_smallGray">Manage your preferences</span></p> <hr style='margin-bottom: 10px;' /> <p><a class='k-link' title='Change My Password' href='../setup/changePassword.jsp'><strong>CHANGE MY PASSWORD</strong></a> <br /><span class='rbs_smallGray'>Switch to a new password</span></p>

In page changePassword.jsp I have (  String returnURL = "personalSetup.jsp").
I would like to change this into (String returnURL = "../m/main.jsp?pageId=104742";) if the caller page id is 104742.

Anyone has any idea on how can I achieve this?



All Replies

Posted by Karthikeyan Bhaskaran on 28-Mar-2016 07:31

Hi Claudia, You may have already tested this - If the requirement is to only use the same page with pageId=104742 for every password change, your solution should work as-is. I'm assuming you want this to be dynamic - dependent upon the caller page. Is that correct? Regards, Karthikeyan

Posted by cSocaciu on 28-Mar-2016 07:45

Hello,

The solution that I'm trying to implement should get/determine the caller page id. Based on this setting I would like the returnUrl to be set in "changePassword.jsp".

I know that I can get the current page Id via helper function in my custom page; however I have no idea how can I pass this to "changePassword.jsp".

Posted by Karthikeyan Bhaskaran on 29-Mar-2016 23:32

Hello Claudia, Still looking if there are options to do what you need. Please disregard my previous comment about changing the returnURLin the JSP - I found out that changing the URL from the JSP somehow seems to prevent the password update from being picked up. Regards, Karthikeyan

Posted by cSocaciu on 30-Mar-2016 00:37

Do you have any suggestion how to make this work?

Posted by Karthikeyan Bhaskaran on 21-Apr-2016 02:32

Hello Claudia, I apologize for the delay in getting back. It is possible to get pageID of current page - but there is no straightforward way to invoke a JSP and pass this for the returnUrl. An alternative solution would be to make your custom page accessible from all pages (like the default My Profile page) and launch it as a new popup / window. User saves the password and closes the window, without leaving the original page. Let me know if this is a good solution for your requirement - I can share the code. Regards, Karthikeyan

This thread is closed