+ Start a Discussion
ThomasmThomasm 

Display list view for custom object

I am looking to create a visualforce page that will show all the record of a custom object and when you click on the name for the record to ope up.  So far i everything is displaying correctly but when i click on the record name nothing happens. 

Here is my code

<apex:page standardController="Jobs__c" recordSetVar="jbs" sidebar="false">
<apex:panelGrid columns="1">
    <apex:form >
     <apex:pageBlock title="Current Accounts">

         <apex:pageBlockTable Value="{!jbs}" var="a">
             <apex:column >
                 <apex:commandLink value="{!a.name}" reRender="Out">
                 <apex:param name="ID" value="{!a.ID}"/>
                 </apex:commandLink>
             </apex:column>
             <apex:column value="{!a.name}"/>
             <apex:column headerValue="Active" >
                 <apex:inputField value="{!a.Active__c}"/>
             </apex:column>
             <apex:Column value="{!a.Job_Number__c}"/>
     </apex:pageBlockTable>
    </apex:pageBlock>
    </apex:form>
    <apex:outputPanel id="out">
    <apex:Detail subject="{!$CurrentPage.parameters.id}" relatedlist="false"/>
    </apex:outputPanel>
    </apex:panelGrid>
</apex:page>
Best Answer chosen by Thomasm
ThomasmThomasm
I thought i would post the code that worked in case anyone came across the same issue

<apex:page standardController="Jobs__c" recordSetVar="jbs" sidebar="false">

    <apex:form >
     <apex:pageBlock title="Current Jobs">
          

<apex:pageBlockSection >
         <apex:pageBlockTable Value="{!jbs}" var="a" id="List">
             
             <apex:column >
        <apex:outputlink value="/{!a.id}">{!a.name} </apex:outputlink>
            </apex:column>

             
             <apex:column headerValue="Active" >
                 <apex:inputField value="{!a.Active__c}"/>
             </apex:column>
             <apex:Column value="{!a.Job_Number__c}"/>
     </apex:pageBlockTable>
     </apex:pageBlockSection>
    </apex:pageBlock>
    </apex:form>
    
   
</apex:page>

All Answers

William TranWilliam Tran
Can you try matching the name and case


Change:
  <apex:param name="ID" value="{!a.ID}"/>
To:
  <apex:param name="jobid" value="{!a.id}"/>


Change:
 <apex:Detail subject="{!$CurrentPage.parameters.id}" relatedlist="false"/>
To:
 <apex:Detail subject="{!$CurrentPage.parameters.jobid}" relatedlist="false"/>


As a common practice, if your question is answered, please choose 1 best answer. 
But you can give every answer a thumb up if that answer is helpful to you. 

Thanks
ThomasmThomasm
That didnt do anything.  when i click on the link nothing happens
William TranWilliam Tran
Try changing the value to "View" to make sure you are clicking the right link.

                 <apex:commandLink value= "View" reRender="Out">
                 <apex:param name="ID" value="{!a.ID}"/>
                 </apex:commandLink>
 
ThomasmThomasm
so now there is the view link but i doesnt do anything
ThomasmThomasm
I thought i would post the code that worked in case anyone came across the same issue

<apex:page standardController="Jobs__c" recordSetVar="jbs" sidebar="false">

    <apex:form >
     <apex:pageBlock title="Current Jobs">
          

<apex:pageBlockSection >
         <apex:pageBlockTable Value="{!jbs}" var="a" id="List">
             
             <apex:column >
        <apex:outputlink value="/{!a.id}">{!a.name} </apex:outputlink>
            </apex:column>

             
             <apex:column headerValue="Active" >
                 <apex:inputField value="{!a.Active__c}"/>
             </apex:column>
             <apex:Column value="{!a.Job_Number__c}"/>
     </apex:pageBlockTable>
     </apex:pageBlockSection>
    </apex:pageBlock>
    </apex:form>
    
   
</apex:page>
This was selected as the best answer