Print this page

Show Related List names Hovering on top of the Visualforce page

Knowledge Article Number 000193472
Description When a standard Salesforce page is overridden by a Visulaforce page using <apex:detail> tag, it loosed the hovering feature for the related list appearing on top of the page.
Resolution You can use the following code to show the related list names to reflect on top of the Visualforce page which hovers when cursor points to the name link.

This is available in salesforce standard pages but when we override the standard page with visualforce page using standard controller and <apex:detail> tag, the related list names does not get visible on top of the page.

This functionality can be achieved using the following script code.

 
<apex:Page id="brokerPage" StandardController="Account" extensions="Custom_Controller" >
 
 
<div class="RLPanelShadow"><div class="RLPanel" id="RLPanel" onblur="sfdcPage.relatedListPanel.hideRLDelayed(null, 100)" onfocus="sfdcPage.relatedListPanel.showRL()" onmouseout="sfdcPage.relatedListPanel.hideRLDelayed(null, 100)" onmouseover="sfdcPage.relatedListPanel.showRL()"><iframe frameborder="0" id="RLPanelFrame" name="RLPanelFrame" src="/emptyHtmlDoc.html" title="Hidden Frame - Ignore"></iframe></div></div><div class="listHoverLinks"><span class="invisibleMinHeight">|</span></div>
<script type="text/javascript">
try { sfdcPage.registerRelatedListPanel('RLPanel',false);} catch(e) {}
</script>
 
<apex:detail subject="{!account.id}" relatedList="false" relatedListHover="true" title="true"/>
 
<!--==========================================================-->
<!-- RELATED LISTS -->
<!--==========================================================-->
<apex:relatedList id="contactList" list="Contacts" pageSize="5"/>
<apex:relatedList id="activityList" list="OpenActivities" />
<apex:relatedList id="historyList" list="ActivityHistories" />
<!--==========================================================-->
<!-- CUSTOM HOVER -->
<!--==========================================================-->
 
<apex:outputPanel rendered="true">
<script type="text/javascript">
try
{
sfdcPage.registerRelatedList('brokerPage:contactList', '', '', false, '', '',false,false,true, '');
sfdcPage.registerRelatedList('brokerPage:activityList', '', '', false, '', '',false,false,true, '');
sfdcPage.registerRelatedList('brokerPage:historyList', '', '', false, '', '',false,false,true, '');
}
catch (e)
{
}
 
</script>
</apex:outputPanel>
 
</apex:page>

Just Copy and paste the above code to make it work.  Standard controller can be changed depending upon the requirement.

 




promote demote