You need to sign in to do that
Don't have an account?
How do I include a visualforce page in a tab.
I have a circumstance where I want to used the <apex:tabPanel component of visualforce, but instead of using a related list as the data in the tab I'd prefer to use a visualforce page.
For Example: Below we have the Account page Tabbed, however I would like to make one of the tabs like the ones below, open in a Visualforce page which has some tabled data that is called in through a custom controller. I am able to re-produce the typical Tabbed Account, but I do not know how to make one of the tabs open a visualforce page in the tab. Is this possible and how would I accomplish this? Any help would be appreciated.
Thanks
Hi,
you can either redirect to another VF page on tabenter/tab click or you can apex:iframe or apex:include to show another VF page in that tab
1. to redirect to another VF:
<apex:tab label="Verification" id="tabVerify1" ontabenter="window.parent.location.replace('/apex/Verification_VF?id=006O0000001ro8BIAQ');">
</apex:tab>
2. to use apex:include to show contents of another page in your tab
<apex:tab label="Verification2" id="tabVerify" ontabenter="window.parent.location.replace('/apex/Verification_VF?id=006O0000001ro8BIAQ');">
<apex:include pageName="Verification_VF"/>
</apex:tab>
Thanks,
Ahmed
Alternatively, you can turn that other Visualforce page into a component instead. That way you can use the same 'page' on several pages simply by adding a single line to a Visualforce page. This would be the best solution to accomplish what you want.
If I am not wrong in understanding you requirement, when you go to setup -->App Setup --> Customize --> Account --> Buttons and Links.
In this you will find an edit link beside Account Tab, when you click on that it, you will be given an option to override the Accounts Tab with your visualforce page.
Is this what you are trying to do?
or else you can always create a custom visualforce tab.
No I was looking more for the situation where I have a tabbed visualforce page, and I want one of the tabs to open a visualforce page.
Thanks
Use either an iframe, or a build a component like I suggested earlier.
Hi,
Did you try what AhmedPot has suggested. <apex:pageinclude> should work but the in the page that you are referencing you should make sidebar = false and showheader=false so that the page will be rendered within the tab
I'm doing a similar project and was wondering how you determine what ID to use. My tabs will be on the contact object so I know it will begin with 003, but what ID should I use in the code?
2. to use apex:include to show contents of another page in your tab
<apex:tab label="Verification2" id="tabVerify" ontabenter="window.parent.location.replace('/apex/Verification_VF?id=006O0000001ro8BIAQ');">
<apex:include pageName="Verification_VF"/>
</apex:tab>
Thank you
Additional question, I'm also wanting a tab for related list items such as Activities and Campaign History. Can anyone recommend the best way to accomplish this?
Thank you
Activities
Campaign History I am looking still for an answer to your earlier question from May 1, 2013...