You need to sign in to do that
Don't have an account?
Setting selectedTab via $CurrentPage.parameters
<apex:page standardController="Account" showHeader="true" tabStyle="account" > {!$CurrentPage.parameters.tabFocus} <br/><br/> <apex:tabPanel switchType="client" escape="false" selectedTab="{!$CurrentPage.parameters.tabFocus}" id="tabPanel" > <apex:tab label="Details" name="AccDetails" id="tabdetails"> <apex:detail relatedList="false" title="true"/> </apex:tab> <apex:tab label="Contacts" name="Contacts" id="tabContact" > <apex:relatedList subject="{!account}" list="contacts" /> </apex:tab> </apex:tabPanel> </apex:page>
...by requesting this URL: https://c.cs1.visual.force.com/apex/TabbedAccount?id=15DigitAccountId&tabFocus=Contacts
I know {!$CurrentPage.parameters.tabFocus} works, because it displays "Contacts".And the selectedTab attribute works great if I hard-code it to "Contacts".
But the combo does nothing. Is this disabled because of Cross site scripting attacks? Or am I missing something? Any help appreciated.
At the end of the day, I'm trying to set the focus of a tab in a tab panel in this VF page when returning from a different page in the app.
Thanks,
cb
Hi Chris, probably this might help
http://community.salesforce.com/sforce/board/message?board.id=Visualforce&thread.id=1534
i am working on this issue as well, but my page redirect to a VF standard page
All Answers
Hi Chris, probably this might help
http://community.salesforce.com/sforce/board/message?board.id=Visualforce&thread.id=1534
i am working on this issue as well, but my page redirect to a VF standard page
I had the same issue, solution perfectly suits my requirement.
Use "Value" attribute instead of "selectedTab" attribute. The latter only helps setting default landing tab.
Thanks,
Yagna
Just do this
selectedTab="{!$CurrentPage.parameters.tab}"
instead of
value="{!$CurrentPage.parameters.tab}"