1

I created a homepage component of type HTML Area and pasted the code as below.

Customized the Homepage layout to include the above component. However when I navigate to the Homepage I could only see an iframe with the Visualforce source displayed.

I had followed the below steps:

  • Created a new "Home Page Component" of type "HTML Area"
  • Before pasting the HTML code, made sure "Show HTML" is selected in the editor.
  • Pasted the above code
  • Unchecked "Show HTML" checkbox, however I could only see the Source code.

What could be wrong?

<apex:page sidebar="false" showHeader="false" standardStyleSheets="false" controller="CasesSidebarController"> 
<html> 
<head> 
<style> body { background-color: #CEEDF7; font-family: Arial, Helvetica, sans-serif; font-size: 12px; } 
</style> 
</head>
<body> 
<apex:dataTable value="{!caseCountByStatus}" var="state"> 
   <apex:column > 
      <apex:outputText style="font-weight:bold" value="{!state}" />
   </apex:column> 
   <apex:column > 
      <apex:outputText style="padding-left:10px" value="{!caseCountByStatus[state]}" /> 
   </apex:column> 
</apex:dataTable> 
</body> 
</html> 
</apex:page>
7
  • Make sure you don't have any open tag. Can you post the code?
    – PepeFloyd
    Commented Nov 25, 2013 at 12:16
  • <apex:page sidebar="false" showHeader="false" standardStyleSheets="false" controller="CasesSidebarController"> <html> <head> <style> body { background-color: #CEEDF7; font-family: Arial, Helvetica, sans-serif; font-size: 12px; } </style> </head>
    – KaLi
    Commented Nov 25, 2013 at 12:37
  • ` <body> <apex:dataTable value="{!caseCountByStatus}" var="state"> <apex:column > <apex:outputText style="font-weight:bold" value="{!state}" /> </apex:column> <apex:column > <apex:outputText style="padding-left:10px" value="{!caseCountByStatus[state]}" /> </apex:column> </apex:dataTable> </body> </html> </apex:page> `
    – KaLi
    Commented Nov 25, 2013 at 12:37
  • @PepeFloyd I couldn't paste it properly. I just tried to embed the code between backticks but could not get it right.
    – KaLi
    Commented Nov 25, 2013 at 12:40
  • 1
    You need to paste your code into the end of your post when you edit it. I've taken care of it for you. Once you do that, you can then move things around.
    – crmprogdev
    Commented Nov 25, 2013 at 14:23

2 Answers 2

1

As the section name indicates, that is a HTML component area, so it doesn't expect Visualforce code. That section won't render visualforce code you enter in there.

4
  • I believe I was not clear; I am trying to expose the homepage component of type HTML Area on to the Home Page layout by referencing the working VF Page (CasesSidebar) via the below code; however on the Home Page I could only see the source code displayed instead of the component rendering the values. The VF Page was tested independently and works fine. <iframe style="border: none" src="/apex/CasesSidebar"></iframe>
    – KaLi
    Commented Nov 25, 2013 at 15:17
  • What's the api version of that page? Can you try removing those HTML and body tags? I was not able to reproduce this issue on my page (which doesn't add them)
    – PepeFloyd
    Commented Nov 25, 2013 at 15:34
  • Api version is 29; no luck even after removing the tags; Were you able to pull details into the home page via the home page component? Nevertheless I will redo the steps (as explained in the initial post) and will update you.
    – KaLi
    Commented Nov 25, 2013 at 16:21
  • API version 29 adds those tags automatically unless you specify not to, try changing the API version to 27.
    – PepeFloyd
    Commented Nov 25, 2013 at 20:11
0

This happens to me, too. If I uncheck "Development Mod" on my user account, this goes away and it displays the anticipated UI, not the Visualforce code.

1
  • This is true for the new (Summer 15) Visualforce Area HomePage Component Type. The direction is to clearly move towards using the Visualforce component type rather than HTML Area ... the below topic from Release Notes states this ... End of Support for JavaScript, iFrames, CSS, and Other Advanced Markup in HTML Area Home Page Components
    – KaLi
    Commented Dec 9, 2015 at 7:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .