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
Peter LarsenPeter Larsen 

bug? Embedded VF page not displaying

I'm trying to present 2 records next to each other using a simple VF page like this:
<apex:page controller="apexdetailissue" id="myPage">
<apex:form>
<apex:panelGrid columns="2" id="theGrid2">
<apex:detail id="myDetailg1" subject="{!Id1}" relatedList="false" inlineEdit="false" />
<apex:detail id="myDetailg2" subject="{!Id2}" relatedList="false" inlineEdit="false" />
</apex:panelgrid>
</apex:form>
</apex:page>

the controller simply returns the Id of 2 accounts: 
public class apexdetailissue{
public Id getId1(){return '0018000000O7t64AAB';}
public Id getId2(){return '0018000000O5bhkAAB';}
}

On the 2 account records there is an embedded VF page:
<apex:page standardController="Account" id="dummypage">
  This is your Dummy VF page
</apex:page>

but it only loads on the leftmost detail and hot on the right most detail.
Note that the Title of this page is teh name of the rightmost account.

It seems to me that the html being generated for the 2 details is ending up with the same id, and the loadign of the 2nd VF pages fails.
Bornstein Seafoods 1:
...
<td class="dataCol col02">Bornstein Seafoods 1&nbsp;<a href="https://na6.salesforce.com/acc/account_hierarchy.jsp?id=0018000000O7t64">[View Hierarchy]</a></td><td class="labelCol">Rating</td><td class="dataCol">&nbsp;</td></tr>
<tr><td class="dataCol col02" colspan="2"><iframe  frameborder="no" height="32px" id="06680000000PkQ2" marginheight="0" marginwidth="0" name="06680000000PkQ2" scrolling="no" title="Dummy" width="100%"></iframe><form  action="https://na6.visual.force.com/servlet/servlet.Integration?lid=06680000000PkQ2&amp;ic=1" id="echoScontrolForm_06680000000PkQ2" method="post" name="echoScontrolForm_06680000000PkQ2" target="06680000000PkQ2" >
...

Bornstein Seafoods 2
...
<td class="dataCol col02">Bornstein Seafoods 2&nbsp;<a href="https://na6.salesforce.com/acc/account_hierarchy.jsp?id=0018000000O5bhk">[View Hierarchy]</a></td><td class="labelCol">Rating</td><td class="dataCol">&nbsp;</td></tr>
<tr><td class="dataCol col02" colspan="2"><iframe  frameborder="no" height="32px" id="06680000000PkQ2" marginheight="0" marginwidth="0" name="06680000000PkQ2" scrolling="no" title="Dummy" width="100%"></iframe><form  action="https://na6.visual.force.com/servlet/servlet.Integration?lid=06680000000PkQ2&amp;ic=1" id="echoScontrolForm_06680000000PkQ2" method="post" name="echoScontrolForm_06680000000PkQ2" target="06680000000PkQ2" >
...

Has anyone solved this?
I've tried to remove the <apex:form>, <apex:panelgrid> etc. it all gives the same result.

Can anyone help?

Matt WhalleyMatt Whalley
I'm using your code, and it is looking fine, how is it failing?
Peter LarsenPeter Larsen
Hi Matt,
The issue I have is that only the enbedded VF page ('dummypage') on the Detail on the left side of the screen is showing.
The embedded VF page on the rightmost page is not showing, just gives a blank area.
Do you have both embedded VF pages loading?