+ Start a Discussion
michaellee.ampfmichaellee.ampf 

Clicking on a apex:Tab redirects to a different URL

Hi,

 

I've got this working on Chrome, but it isn't working on Internet Explorer yet so I want to see what I can do.

 

I've got a custom VisualForce page that has an <apex:tabPanel>.  I'd like one of the <apex:tab> that are a part of that redirect to the standard contact page for a particular contact.  (I've got the ID.)  

 

I've got a controller function that returns a PageReference to the standard page;

 

public PageReference goToStandard() {
PageReference contactPage = new ApexPages.StandardController(con).view();
contactPage.setRedirect(true);
return contactPage;
}

 

Does anone have any suggestions ?

 

Right now my VisualForce page has the following code fragment, which appears to work in Google:

 

<apex:form >
<apex:actionFunction name="redirect" action="{!goToStandard}"
immediate="true" status="Loading" />
</apex:form>

<apex:tabPanel switchType="server" selectedTab="{!startingTab}"
id="ContactTabPanel" tabClass="activeTab"
inactiveTabClass="inactiveTab" value="{!startingTab}">
<apex:tab label="Contact" name="ConLink" id="tabLink"
onTabEnter="redirect();"
immediate="true"
></apex:tab>

...

</apex:TabPanel>

 

Does anyone have any suggestions on how this might work with Internet Explorer?  Note -- I can try a completely different approach if it accomplishes the goal, which is that clicking on a tab redirects to a standard page..

 

Michael

michaellee.ampfmichaellee.ampf

Changing the switch type to ajax on the tab did the trick, then it recognized properly in both cases.