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
Cookie76Cookie76 

Display hover using LookupHoverDetail along with scrollable outputpanel

I'm trying to create a pageblocktable that uses lookuphoverdetails to display the mini page details for Accounts on a custom object.

 

The problem that I'm experiencing is that the pageblocktable is contained inside a scrollable outputpanel.

 

When the user scrolls down the table the hover shows up towards the bottom of the page where the row would have existed if it wasn't inside the scrollable outputpanel.

 

Has anyone exeperienced this issue?  It looks like the VF Page creates hidden entries for the lookup hovers that are down the bottom of the page.

Avidev9Avidev9

Well using the Default LookupHoverDetail is a bit hackish and also not recommended.

You never know what is the actual implementation behind the seen and obviously these can change with version to version without prior notice.

 

Well I also faced similar problem. The hover was displayed on the first record if your list has multiple enteries. So if there are are two accounts with name "Test Acc". the hover will always display on the first "Test Acc" no matter where you hover. What I will suggest you to create your own hoverDetail Page to avoid such issues

Cookie76Cookie76

The problem your facing is easily fixed:

 

"The hover was displayed on the first record if your list has multiple enteries. So if there are are two accounts with name "Test Acc". the hover will always display on the first "Test Acc" no matter where you hover. What I will suggest you to create your own hoverDetail Page to avoid such issues"

 

The solution is to give the a href tag a unique id and then use that in the hover 

 

<a href="/{!c.cCredit.Account__c}" id="{!c.cCredit.Id}Acc" target="_blank" onblur="LookupHoverDetail.getHover('{!c.cCredit.Id}Acc').hide();" onfocus="LookupHoverDetail.getHover('{!c.cCredit.Id}Acc', '/{!c.cCredit.Account__c}/m?retURL=%2F{!c.cCredit.Account__c}&isAjaxRequest=1').show();" onmouseout="LookupHoverDetail.getHover('{!c.cCredit.Id}Acc').hide();" onmouseover="LookupHoverDetail.getHover('{!c.cCredit.Id}Acc', '/{!c.cCredit.Account__c}/m?retURL=%2F{!c.cCredit.Account__c}&isAjaxRequest=1').show();">{!c.cCredit.Account__r.Name}</a>

 

Avidev9Avidev9
You got me there :P,
But still we went for a our own custom solution rather than acustom one!

Anyways loved your solution thanks