title: Visualforce Custom Controller List
body: <p>What I'm looking to do is create a custom controller list that displays a mash up of Opportunities, cases and potentially one other object.  I started using the class from the visualforce guide to get me going:</p>
  
  <pre><code>public with sharing class CasePagination {
  private final Case c;
  
  public CasePagination(ApexPages.StandardSetController controller) {
  this.c = (Case)controller.getRecord();
  }
  public ApexPages.StandardSetController CaseRecords{
  get {
  if(CaseRecords == null) {
  return new ApexPages.StandardSetController(Database.getQueryLocator(
  [SELECT c.CaseNumber, c.AccountId, c.Subject, c.Status FROM Case c]));
  }
  return CaseRecords;
  }
  private set;
  }
  public List&lt;Case&gt; getCasePagination() {
  return (List&lt;Case&gt;) CaseRecords.getRecords();
  }
  }
  </code></pre>
  
  <p>I adapted some visualforce code to display a list of cases for now:</p>
  
  <pre><code>&lt;apex:page standardController="Case" recordSetvar="cases" extensions="CasePagination"&gt;
  
  &lt;apex:pageBlock title="Viewing Cases"&gt;
  &lt;apex:form id="theForm"&gt;
  
  &lt;apex:pageBlockTable value="{!CasePagination}" var="c"&gt;
  &lt;apex:outputLink value="{!c.Id}"&gt;{!c.CaseNumber}&lt;/apex:outputLink&gt;
  &lt;apex:column value="{!c.Id}"/&gt;
  &lt;apex:column value="{!c.CaseNumber}" /&gt;
  &lt;apex:column value="{!c.Subject}" onclick="openCase"/&gt;
  &lt;apex:column value="{!c.Status}" onclick="openCase"/&gt;
  &lt;/apex:pageBlockTable&gt;
  
  &lt;apex:panelGrid columns="2"&gt;
  &lt;/apex:panelGrid&gt;
  &lt;/apex:form&gt;
  &lt;/apex:pageBlock&gt;
  &lt;/apex:page&gt;
  </code></pre>
  
  <p>What I'm trying to do now is make the items in the table clickable. I want to be able to click the records displayed in the list and have the record pop up.</p>
  
  <p>Thanks.</p>