You need to sign in to do that
Don't have an account?
IT Admin Deloitte
onclick method on custom visualforce tabs
Hi All,
in a VF page I create 5 custom tabs, called Orders, Orders II,...etc
<apex:tab label="Orders" name="OrderDetails" id="tabdetails">
smt in here
<apex:tab/>
I want click on Order II tab and visualize the corresponding content, in the same page.
Now the VF shows correctly the tabs, but I can't click on them. I can only visualize the first tab.
Is there a sort of onclick method that I have to implement?
How it should be composed and then called in the vf page?
Thankyou!!
in a VF page I create 5 custom tabs, called Orders, Orders II,...etc
<apex:tab label="Orders" name="OrderDetails" id="tabdetails">
smt in here
<apex:tab/>
I want click on Order II tab and visualize the corresponding content, in the same page.
Now the VF shows correctly the tabs, but I can't click on them. I can only visualize the first tab.
Is there a sort of onclick method that I have to implement?
How it should be composed and then called in the vf page?
Thankyou!!
All Answers
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_tabPanel.htm
The <apex:tab> component must be a child of a <apex:tabPanel>.
Following markup worked for me.. I think onclick event is not required here to switch between the tabs..
However, if required onclick attribute is still available..
<apex:page id="thePage">
<apex:tabPanel switchType="client" selectedTab="name2" id="theTabPanel">
<apex:tab label="Orders 1" name="name1" id="tabOne">content from Orders 1</apex:tab>
<apex:tab label="Orders 2" name="name2" id="tabTwo">content from Orders 2</apex:tab>
</apex:tabPanel>
</apex:page>
I implemented it as specified in the previous link.
<script type="text/javascript" language="javascript"> if(jQuery) { jQuery.noConflict(); } </script>