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
KaityKaity 

Syntax on List Size

Hi,
Just wondering, how this "{!(contactList.size != 0)}" syntax is working. I knew List.size() is always used. in this example '()' is missing. Any idea??

EXAMPLE:
<apex:pageBlockTable value="{!innerContactList}" var="innerCont" <strong><font color="#ff0000">rendered="{!(contactList.size != 0)}"</font></strong>>

Thanks.
 
PratikPratik (Salesforce Developers) 
Hi Kaity,

List.size works in VF page. List.size() is for apex class. I tried it with a sample example.

You can refer to:
http://salesforce.stackexchange.com/questions/18603/rendering-output-panel-if-list-is-not-null

Thanks,
Pratik

P.S. If this answers you question, please mark it as "Best Answer" so it will help other community members too.
Seth PartridgeSeth Partridge
@Pratik - that worked perfectly - thanks for your help!