You need to sign in to do that
Don't have an account?

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
Class
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>(); showOrder.add(order); Id accId = order.Accounts_to_look_for__c; showAcct = new List<Account>(); Account ac = [select Id,Name from Account where Id =: accId]; showAcct.add(ac); Id contId = order.Contacts_to_look_for__c; showCont = new List<Contact>(); Contact c = [select Id,Name from Contact where Id =: contId]; showCont.add(c); } 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:param> </apex:actionsupport> </apex:column> <apex:column headervalue="First Name"> <apex:outputfield value="{!ord.Name}"> </apex:outputfield> </apex:column> </apex:pageBlockTable> </apex:pageBlockSection> </apex:pageBlock> <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:column> </apex:pageblocktable> </apex:pageblock> <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:column> </apex:pageblocktable> </apex:pageblock> <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" /> </apex:column> </apex:pageblocktable> </apex:pageblock> </apex:form> </apex:page>
Thanks in Advance