function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Rani_RRani_R 

Tab Resets to Home - Please help...

Hi,

 

I have a tab named DocumentManagement. and i have a VF Page named loginpage. I have assigned loginpage as content to the DocumentManagement tab..... So when i go to DocumentManagement tab, the loginpage is displayed.

 

when i click on the login button in that page i call a function in my LoginController apex class....

 

I submit the username and password to a jsp page and get an xml back.... if it is success i have to redirect to a newpage.. Below is my code to do that. I have a page named IDM_Index...

 

if(element.nodeValue.equals('Success')){
                      ApexPages.PageReference nextPage = Page.IDM_Index;
                      nextPage.setRedirect(true);
                      return nextPage;

 

It gets successfully redirected to idm_index page, BUT THE PROBLEM I FACE IS, THE SELECTED TAB IS NOT DocumetnManagement, instead now the selected tab is Home... i dont know why it got resetted to home.. i want it to stay in DocumentManagement itself...... Is there any setting i should do for this? PLEASE HELP, THIS IS A MAJOR PROBLEM FOR ME.....

 

Also when i click on login, during the redirection the whole salesforce page is getting refreshed, but instead i want the loginPage alone go blank and come as IDM_Index... Please let me know what i should do? i should use ajax is it?

 

Thanks and Regards,

Rani...

AhmedPotAhmedPot

May be using tabStyle attribute of apex:page can help.

 

for second issue, you can try re-render attribute on command button.

Rani_RRani_R

Hi ahmed,

 

Thanks, the first one worked like a charm.... Now my tab is selected properly...

 

But i dont know how to try your second advice. can you please explain.

 

Thanks

AhmedPotAhmedPot

If you want to reload a portion of your page instead of complete page, then use rerender attribute in command button.

You can check visualforce guide, to find more on rerender attribute.

I'm not sure if that is what you are intending to achieve but hopefully this might help you in some way.

 

- Ahmed