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
NikiG22NikiG22 

List View with ALL records

Hello i have a view of all of our candidates for emplayers to see, but for some reason the list view isnt showing ALL the candidates? can anyone help?

 

Also it would be nice to add a Next and previous page..just a nice to have

 

code:

<apex:page standardController="Candidate__c" recordSetVar="Candidate__c"  sidebar="false" showheader="false" id="candidatelist">


<style>
pageBlockTable.format{
text-color:"black";
font-family:"Times New Roman", Times, serif;
size:5;
text-align:justify;
}

</style>


<!-- Image Header -->
<head>
<center><h class="margin"><a href="http://www.healthecareers.com" target="_blank"><img src="https://c.na3.content.force.com/servlet/servlet.ImageServer?id=01550000000PNYo&oid=00D500000007FIS&lastMod=1327507164000"/></a> 
</h>
</center>

</head>

<P align="center"> <font size="5"> Candidates Attending the April 10th New York City Healthcare Career Fair by <b>HEALTH</b>e<i>CAREERS</i></font></p>

<!--Start List View-->
<table align="center" width="80%">
<tr>
<td>
  <apex:pageBlock mode="listview" >
   <apex:pageBlockTable columns="4" columnsWidth="20%" width="50%" value="{!Candidate__c}" align="center" var="c" style="format">
      <apex:column headerValue="Name" value="{!c.Full_Name__c}" />
      <apex:column headerValue="Job Category" value="{!c.JobSeeker_Type__c}"/>
      <apex:column value="{!c.Years_of_exp__c}"/>
      <apex:column headerValue="View Resume"> 
      <apex:outputLink value="/apex/AttachmentsCandidateView?id={!c.id}" target="_blank">Click here</apex:outputLink>
      </apex:column>
   </apex:pageBlockTable>
  </apex:pageBlock>
</td>
</tr>
</table>


</apex:page>

 thanks,

Niki

Best Answer chosen by Admin (Salesforce Developers) 
NikiG22NikiG22

I have figured it out: here is the controller:

public class dataTableCon{
public Candidate__c cc{set;get;}
public list<Candidate__c> cvd{get;set;}

public dataTableCon(ApexPages.StandardController controller) {
cvd = new list<Candidate__c>();

cvd = [select Full_Name__c, JobSeeker_Type__c,Years_of_exp__c from Candidate__c ];

    }
    
   }

 

 

Here is the page:

<apex:page standardController="Candidate__c" extensions="dataTableCon"  sidebar="false" showheader="false" id="candidatelist">

 
  <apex:pageBlock >
<apex:pageBlockTable value="{!cvd}" var="c" width="50%">
      <apex:column value="{!c.Full_Name__c}" />
      <apex:column headerValue="Job Category" value="{!c.JobSeeker_Type__c}"/>
      <apex:column value="{!c.Years_of_exp__c}"/>
      <apex:column headerValue="View Resume"> 
      <apex:outputLink value="/apex/AttachmentsCandidateView?id={!c.id}" target="_blank"><font color="#076ea6">Click here</font></apex:outputLink>
      </apex:column>
</apex:pageBlockTable>
  </apex:pageBlock>





</apex:page>

 

All Answers

Starz26Starz26

it would seem to be a sharing setting as you are using the standard controller and no filter right?

 

if you as an admin look at the page do you see all the records?

 

Just curious, is listview a valid mode? It is not listed as a value in the docs. What if you take the mode out. do all the records display?

NikiG22NikiG22

right - i have no filter, its the same if i preview as an admin. and i did take out the mode="listview'? its weird?

NikiG22NikiG22

I have figured it out: here is the controller:

public class dataTableCon{
public Candidate__c cc{set;get;}
public list<Candidate__c> cvd{get;set;}

public dataTableCon(ApexPages.StandardController controller) {
cvd = new list<Candidate__c>();

cvd = [select Full_Name__c, JobSeeker_Type__c,Years_of_exp__c from Candidate__c ];

    }
    
   }

 

 

Here is the page:

<apex:page standardController="Candidate__c" extensions="dataTableCon"  sidebar="false" showheader="false" id="candidatelist">

 
  <apex:pageBlock >
<apex:pageBlockTable value="{!cvd}" var="c" width="50%">
      <apex:column value="{!c.Full_Name__c}" />
      <apex:column headerValue="Job Category" value="{!c.JobSeeker_Type__c}"/>
      <apex:column value="{!c.Years_of_exp__c}"/>
      <apex:column headerValue="View Resume"> 
      <apex:outputLink value="/apex/AttachmentsCandidateView?id={!c.id}" target="_blank"><font color="#076ea6">Click here</font></apex:outputLink>
      </apex:column>
</apex:pageBlockTable>
  </apex:pageBlock>





</apex:page>

 

This was selected as the best answer