I have one VF page that I'd like to use for multiple tabs depending on some logic in the controller. Is there any way to set tabStyle dynamically? I've tried both of the following, and neither one works:
Attempt #1
<apex:page ... tabStyle="{!IF(some_logic_is_true,'TabA__tab','TabB__tab')}" ... >
Attempt #2
/* in the controller */
public String getTabStyle () {
if (some_logic_is_true) {
return 'TabA__tab';
}
return 'TabB__tab';
}
<!-- the VF Page -->
<apex:page ... tabStyle="{!tabStyle}" ... >
Result: Both of these approaches resulted in the following error:
Save error: Invalid tabStyle '{!tabStyle}' specified. If you are trying to reference
a custom Visualforce tab, you must append '__tab'.
Any other ideas out there?
