• Peter Larsen
  • NEWBIE
  • 10 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies
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?

I want to put 2 apex details next to each other on a VF page like this:
<apex:page controller="apexdetailissue" >
        <table width="900px" border="1"><tr>
        <td width='50%' valign='top'>
             Column 1
        </td>
        <td width='50%' valign='top'>
            Column 2
        </td>
        </tr>
        </table>


        <table width="900px" border="1"><tr>
        <td width='50%' valign='top'>
             <apex:detail subject="{!Id1}" inlineEdit="false" title="false"  />
        </td>
        <td width='50%' valign='top'>
            <apex:detail subject="{!Id2}" inlineEdit="false" title="false"  />
        </td>
        </tr>
        </table>
</apex:page>

//Controller class, with Ids of 2 accounts as an example:
public class apexdetailissue{
public Id getId1(){return '0018000000O7t64AAB';}
public Id getId2(){return '0018000000O5bhkAAB';}
}

The first table, looks fine, the 900px is respected and the 50/50 split is fine, but on the 2nd table, the with of the apex:detail is controled by the fields on the related list for e.g. the contacts/opportunities/tasks etc.
I know that I can hide the related listes, but the point is that I actually want the related lists show too.
But it seems that the apex:detail is overriding the widths of the embrasing table.
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?

I want to put 2 apex details next to each other on a VF page like this:
<apex:page controller="apexdetailissue" >
        <table width="900px" border="1"><tr>
        <td width='50%' valign='top'>
             Column 1
        </td>
        <td width='50%' valign='top'>
            Column 2
        </td>
        </tr>
        </table>


        <table width="900px" border="1"><tr>
        <td width='50%' valign='top'>
             <apex:detail subject="{!Id1}" inlineEdit="false" title="false"  />
        </td>
        <td width='50%' valign='top'>
            <apex:detail subject="{!Id2}" inlineEdit="false" title="false"  />
        </td>
        </tr>
        </table>
</apex:page>

//Controller class, with Ids of 2 accounts as an example:
public class apexdetailissue{
public Id getId1(){return '0018000000O7t64AAB';}
public Id getId2(){return '0018000000O5bhkAAB';}
}

The first table, looks fine, the 900px is respected and the 50/50 split is fine, but on the 2nd table, the with of the apex:detail is controled by the fields on the related list for e.g. the contacts/opportunities/tasks etc.
I know that I can hide the related listes, but the point is that I actually want the related lists show too.
But it seems that the apex:detail is overriding the widths of the embrasing table.