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
SwarnaSwarna 

Pagination

I use dataTable to display records. I need to paginate the output.
Is there any VF component/attribute for pagination?
mtbclimbermtbclimber
You can present the listviews component which includes the standard salesforce pagination capabilities but if you need to populate your own set directly then you must implement pagination.
SwarnaSwarna
Thanks for the reply. Can the listViews be used with dataTable & column? Can you please give an example? I couldnt find any in the Developer's guide.

<apex:dataTable value="{!existingUsers}" var="user" id="userTable"  >
<apex:column>
<apex:facet name="header">First Name</apex:facet>
<apex:outputText value="{!user.customUser.firstname}" />
</apex:column>


jwetzlerjwetzler
dataTable/column can be used to create lists and iterations like listViews, but there is no reason to use them together.  I am not sure what you're asking.  apex:listViews is one of our coarse-grained components that you can use to just get the regular listView you'd see for that object.

you can use pageBlockList (pageBlockTable in Summer '08) to get salesforce look and feel -- basically something that will look just like listViews (but as Andrew mentioned you will need to implement pagination yourself).

Also be sure to look at headerValue and value attributes on column.
ChrisGountanisChrisGountanis
How do you find what version you have under development environment? I was following the documentation and pageBlockTable had to be repleased with pageBlockList. Does this mean I won't be able to use the new code till it is released on production? Is there anyway to update the development world? This does not give me much time to roll out some pages for production when released.
jwetzlerjwetzler
The way our deprecation works is that you'll still be able to run your page that uses pageBlockList.  However, as soon as you try to edit and save it, you will need to rename your references from pageBlockList to pageBlockTable (you will see a compile error telling you so).  There is no rush to change before  deployment however as your page should still work.
ChrisGountanisChrisGountanis
Well I just installed Visualforce on my dev account today. The documentation which uses PageBlockTable will not work at all. This makes learning using the provided documentation very annoying. You are saying PageBlockTable is what it should be and it should work today? Am I missing something?
jwetzlerjwetzler
Sorry.  PageBlockList was renamed to PageBlockTable in Summer '08.  It sounds like you are still on Spring '08.  I have already asked about why the links on the wiki for both Spring 08 and Summer 08 documentation point to the same (Summer 08) link at the moment but that has not been fixed yet.

You will be able to use pageBlockList in your page, and when your instance is upgraded, your page will still run.  But if you edit and save after that, you will need to rename it. 

Jill
ChrisGountanisChrisGountanis
How do you know what version your development sandbox is using? How do I upgrade to Summer 08?
jwetzlerjwetzler
See my response here:
http://community.salesforce.com/sforce/board/message?board.id=Visualforce&thread.id=1642

Your instance will be upgraded according to the schedule at the bottom of the trust site.