0

I have login page. For valid user, page redirect to profile page. I am passing email as parameter in URL for successful login.

PageReference pg= Page.MyProfile;
pg.getParameters().put('email',email);
pg.setRedirect(true);
return pg; 

By using this email am getting user profile data and displayed in form. Once user update the details in that form and click on submit button values updated in the profile object, but the parameter not visible in URL. Still Parameter value exists in URL, but its in hidden state.

Once user refresh the page, profile details are empty. I didn't use rerender in command button.

<apex:commandbutton action="{!Save}" value="submit" id="button"/>

How can i make parameter value visible for all actions in profile page until user logout from page.

Please help on this.

0

When you submit the form it does not get added to your browser URL but it is there in your view state.

You can get the url by using following apex code.

String tmp = ApexPages.CurrentPage().getParameters().get('email');

and then redirect to the user tmp url.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.