Friday, September 14, 2012

Salesforce tabStyle attribute in apex

When you use a custom controller, the tabStyle attribute of an <apex:page> tag allows you to mimic the look and feel of the associated Salesforce page. If you only want portions of the page to be similar to a Salesforce page, you can use the tabStyle attribute on the <apex:pageBlock> tag

tabStyle in <apex:page> tag:
<apex:page standardController="Account" showHeader="true" tabStyle="account" >
For a custom tab we have to add "__tab" after the tab name.
Example: <apex:page standardController="Account" showHeader="true" tabStyle="CustomTab_Name__tab" >

Limitation: Salesforce does not support assigning tabStyle dynamically like below.
<apex:page standardController="Account" showHeader="true" tabStyle="{!vartabStyle}" >

No comments:

Post a Comment