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

Custom Console View in Visual Force Page

Hi All


My requirement is to generate a console view for 3 objects .. i hv a custom object Order__c and account and contact object .. i have lookup for account and contact in order obj .. now everything is working fine .. rendering elements shud be in the form of a console layout with Account Detail and Contact Detail in the Right pane ..

Now what i get is just as a pageblock such that both Account and Contact is rendered one below the other .. i don know how to get it done ..
Someone please help me out


public class ConsoleCustomOrder { 
    //public List<Order__c> allOrd {get;set;}
    public List<Account> showAcct;
    public List<Order__c> showOrder;
    public List<Contact> showCont;
    //public Id chosenOrderId {get;set;}

    public List<Order__c> getAllOrders() {
        List<Order__c> allOrd = [select Id,Name,Accounts_to_look_for__c,Contacts_to_look_for__c from Order__c LIMIT 10];
        return allOrd;
    public void ShowOrderDetail() {
        String ordId = System.currentPagereference().getParameters().get('abc');
        Order__c order = [select Id,Name,Accounts_to_look_for__c,Contacts_to_look_for__c from Order__c where Id =:ordId];
        showOrder = new List<Order__c>();

        Id accId = order.Accounts_to_look_for__c;
        showAcct = new List<Account>();
        Account ac = [select Id,Name from Account where Id =: accId];
        Id contId = order.Contacts_to_look_for__c;
        showCont = new List<Contact>();
        Contact c = [select Id,Name from Contact where Id =: contId];
    public List<Order__c> getOrderDetail() {
        return showOrder;

    /*public list<SelectOption> getOrderItems() {
        list<SelectOption> opt=new list<SelectOption>();
        for(integer i=0;i<allOrd.size();i++) 
            opt.add(new SelectOption(allOrd[i].id,allOrd[i].Name));
        return opt;

    public List<Account> getAccDetail() {
        return showAcct;

    Public List<Contact> getContDetail() {
        return showCont;


 Vf Page :


<apex:page controller="ConsoleCustomOrder" sidebar="false" showHeader="false">
    <apex:form >
        <apex:pageBlock id="mainpb" title="Pick an Order to Display">
            <apex:pageBlockSection >
            <apex:pageblocktable id="mainpbt" value="{!AllOrders}" var="ord">
               <apex:column headervalue="Select An Order Item" width="2">                    
                  <apex:actionsupport action="{!ShowOrderDetail}" event="onclick" rerender="orderpb,ordertable,mainpb,mainpbt,accpb,acctable,conpb,contable">  
                   <input type="radio" />                    
                    <apex:param name="abc" value="{!ord.Id}">

               <apex:column headervalue="First Name">
                  <apex:outputfield value="{!ord.Name}">

        <apex:pageblock id="orderpb">
            <apex:pageblocktable id="ordertable" value="{!OrderDetail}" var="selord">                       
                <apex:column headerValue="ord det"> 
                   <apex:detail subject="{!selord.Id}" relatedList="false" title="false" inlineEdit="true" />

        <apex:pageblock id="accpb">
            <apex:pageblocktable id="acctable" value="{!AccDetail}" var="selacc">                       
               <apex:column headerValue="acc det"> 
                   <apex:detail subject="{!selacc.Id}" relatedList="false" title="false" inlineEdit="true" /> 

        <apex:pageblock id="conpb">
            <apex:pageblocktable id="contable" value="{!ContDetail}" var="selcon">                       
               <apex:column headerValue="cont det"> 
                   <apex:detail subject="{!selcon.Id}" relatedList="false" title="false" inlineEdit="true" /> 



Thanks in Advance