Conditional rendered with list size Salesforce

Sample Code:

<apex:pageBlockTable value="{!empList}" var="emp" rendered="{! IF(empList.size > 0, true, false)}">
<apex:column value="{!emp.Name}"/>
<apex:column value="{!emp.Age}"/>

the pageblock will be rendered only if the empList list size from the controller is greater than zero.


1 comment:

  1. Thanks, Very Useful! :)
    -Parthiban P


Sharing is Caring!!! Share this with your friends!!!

submit to reddit