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
JD1968JD1968 

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:pageBlock>
  
      <apex:pageBlockSection title="projects" >
  
      	<apex:pageBlockTable var="p" value="{!projects}">
          	<apex:column width="15%" headerValue="Name" value="{!p.Name}"/>
      	</apex:pageBlockTable>
  
      </apex:pageBlockSection>
  </apex:pageBlock>
  
</apex:page>

 

jwetzlerjwetzler

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

http://www.salesforce.com/us/developer/docs/pages/Content/pages_controller_sosc_pagination.htm

 

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.

JD1968JD1968

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

 

Cheers

John

jwetzlerjwetzler

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.