1

I have a Custom Vf page which calls a custom component carrying:

Cannot display the data in tabs.

Here is the vf page and component:

<apex:page docType="html-5.0">

    <apex:tabPanel switchType="server">

        <apex:tab label="testing Differences" labelWidth="300" id="tab2"><c:Component1 /></apex:tab>
</apex:tabPanel>
</apex:page>

Component

<apex:component >
 <analytics:reportChart reportId="00Op0000000Iqrst></analytics:reportChart>
</apex:component>

The tab does not displays any data .

As checked in the developer forums:

https://developer.salesforce.com/forums/?id=906F0000000fzqoIAA

and

https://success.salesforce.com/issues_view?id=a1p30000000T45IAAS

not sure, if can be used with a tab.

Please assist. Thanks!

2

Actually there is a Known Issue that seems much more likely to be your issue:

Spring '15 - <analytics:reportChart> tag causes a Javascript error if the component is enclosed within an tag

Summary
In Spring '15, a Javascript error is thrown as a result of an tag being enclosed within an tag on the same Visualforce page.

Repro
To reproduce, create a simple Visualforce page as follows:

<apex:page id="Page" showHeader="false" sidebar="false" > 
    <apex:tabPanel > 
        <apex:tab label="Tab1" name="Tab1"> 
            <analytics:reportChart reportId="00O############"/> 
        </apex:tab> 
    </apex:tabPanel> 
</apex:page> 

When you access the page, you will observe the following Javascript error in the browser console:

Error while running $A.run() : object is not a function

Workaround
To workaround this issue you create a new Visualforce new page containing the <analytics:reportChart> tag and embed the page inside an <apex:tab> tag using an iframe as follows:

Visualforce Page with embedded iframe:

<apex:page id="Page" showHeader="false" sidebar="false" > 
    <apex:tabPanel> 
        <apex:tab label="Tab1" name="Tab1"> 
            <apex:iframe src="/apex/iframepage"/> 
        </apex:tab> 
    </apex:tabPanel> 
</apex:page> 

Visualforce Page containing tag to be embedded:

<apex:page id="Page" showHeader="false" sidebar="false" > 
    <analytics:reportChart reportId="00O############" /> 
</apex:page>

Notice that this Known Issue is currently not fixed in any org, unlike the Known Issue you posted which is fixed in all orgs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.