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 :
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 ?