1

I have a created a custom home page component and it will be displaying the following VF page.

The issue here is after adding the home page component to my home page layout I am unable to see the VF page rendering.

Visualforce Page

<apex:page sidebar="false" showHeader="false" standardStylesheets="false" controller="CasesSideBarController">
<html>
<head>
   <style>
            body
            {
              background-color: #CEED7;
              font-family:Arial,Helvetica,sans-serif;
              font-size:12px;

            }
   </style>
</head>
<body>
<apex:dataTable value="{!casecountbystatus}" var="c">
<apex:column >
<apex:outputText style="font-weight:bold" value="{!c}" />
</apex:column>
<tr />
<apex:column >
<apex:outputtext style="padding-left:10px" value="{!casecountbystatus[c]}" />
</apex:column>


</apex:dataTable>
</body>
</html>
</apex:page>

Controller

public with sharing class CasesSideBarController {

public Map<String,Integer> casecountbystatus {get;set;}

public CasesSideBarController()
{

List<String> closedLables = new List<String>();
for(CaseStatus ca : [Select MasterLabel FROM CaseStatus WHERE IsClosed = true])
{
closedLables.add(ca.MasterLabel);
}

casecountbystatus = new Map<String,Integer>();
for(AggregateResult ar : [SELECT Status, COUNT(Id) CaseCount FROM Case WHERE Status NOT IN :closedLables GROUP BY Status])
{

casecountbystatus.put((String) ar.get('Status'), (Integer) ar.get('CaseCount'));

}


}

}

Screenshot of the home page layout shown below :

enter image description here

Instead it is showing the VF page code.

Can someone tell me why the VF page is not getting rendered and only the actual VF markup is getting rendered ?

  • 2
    Do you have Development Mode enabled for your User? Looks like a development frame. – neff Apr 20 '15 at 13:28
1

Disable development mode and check it may solve

  • Welcome to SFSE raviteja. Can you add some extra content to this to say how to do that and why it works? You're 100% right, just good to have more details available to users :) – Matt Lacey Apr 21 '15 at 7:24

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.