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
Enrico devEnrico dev 

Show Size of list visual force

This is my VF page:
<apex:page standardController="Account">
<apex:relatedList list="Contacts" />
</apex:page>
I would like to show number of records in the related list. I´ve tried, without success, with:
{!Account.Contacts.size}


How can i accomplish this?

Thanks in adavantage for any advice
RadnipRadnip
You will have to create a method to return the size and then display it on the visualforce page. Create a controller extension class and create a method to do it. Information can be found in the Apex workbook (http://www.salesforce.com/us/developer/docs/apex_workbook/) a great start to developing in Salesforce.
Enrico devEnrico dev
Thanks for your Input Radhip.
I have done it in a controller extension (using a property) but i would like to avoid the query to get number of records (or list of contacts to apply size() method). Is there a way to do calculate number directly in the vf page having just the list?