+ Start a Discussion

Standard controller - pageBlockTable - number of rows?

I am trying to develop a simple page to list a custom object (Project).  It works but it only ever shows 20 rows.  Is this the functionality of the standard controller or the pageBlockTable?  I have tried setting the 'rows' attribute of the pageBlockTable but it never shows more than 20!


Any help greatly appreciated,


<apex:page standardStylesheets="true" standardController="Project__c" recordSetVar="projects"  >
      <apex:pageBlockSection title="projects" >
      	<apex:pageBlockTable var="p" value="{!projects}">
          	<apex:column width="15%" headerValue="Name" value="{!p.Name}"/>



You sure it's 20?  According to the documentation it's 25.



The rows attribute on pageBlockTable is not going to show you more rows than you have data.  If you want a larger page size you need to set it in a controller extension.


Thanks Jill, it's showing 20 but I note what it says in the doco.  I'll investigate the controller extension option.





Okay yeah I just looked and there seems to be a discrepancy between the doc and the code, I'll file a bug to get the doc fixed.  Adjusting the pageSize should definitely get you what you need though.