function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
chriseustacechriseustace 

Showing a vf page on home screen

I created a VF page that I'd like to display on my homescreen.

I've tried to use iframes and an html component, it looks ok in the preview, but then is cut off when I view it on the screen, here's the code and what it looks like:

 

any ideas?

 

<br><iframe src="/apex/ParalegalBreakdown" width="50%" height="100%"></iframe></br>

Best Answer chosen by Admin (Salesforce Developers) 
paul-lmipaul-lmi

we do the same thing with iframes.  i think you can get around it by staticly forcing the height of the iframe.  i'm not sure if they set a max height for the component itself, but if not, that should work.  you just can't use a % for the value of height, you have to define a set pixel count.

All Answers

paul-lmipaul-lmi

we do the same thing with iframes.  i think you can get around it by staticly forcing the height of the iframe.  i'm not sure if they set a max height for the component itself, but if not, that should work.  you just can't use a % for the value of height, you have to define a set pixel count.

This was selected as the best answer
chriseustacechriseustace

That worked!  Thank you!

paul-lmipaul-lmi

Glad to hear!

chriseustacechriseustace

One last question - the table I am rendering is really vanilla.  Is there any easy way to use the css from salesforce to keep a consistent look and feel? 

paul-lmipaul-lmi

use the tabStyle attribute of apex:page

 

for instance, we built a custom Ideas widget for the home page, so we used <apex:page tabStyle="Ideas" ...>

chriseustacechriseustace

Id like it to look like the dashboard snapshots, when I try to reference tabstyle="Accounts" for instance, I get this error:


Error: Invalid tabStyle 'Contacts' specified. If you are trying to reference a custom Visualforce tab, you must append '__tab'.

chriseustacechriseustace

here's the code for reference:

<apex:page controller="paralegalBreakdown" showHeader="false">

<br/>
<table cellpadding="5" cellspacing="0" border="1">

<apex:repeat value="{!breakdown}" var="r">

   <tr>

     <apex:repeat value="{!r}" var="c">

       <td>{!c}</td>

     </apex:repeat>

  </tr>

</apex:repeat>

</table>
</apex:page>

paul-lmipaul-lmi

Try "Account", no "s".  I think Ideas is special.  It's been a while.