How to check whether a list is empty or not in Visualforce page in Salesforce?

How to check whether a list is empty or not in Visualforce page in Salesforce?

Sample Code:


        <apex:outputPanel style=”visibility:{! IF(ISNULL(PGList), ‘hidden’, ‘visible’) }”>
            <apex:outputText styleClass=”bld” value=”Public Group(s) :”/><br/>
            <apex:pageBlockTable value=”{!PGList}” var=”PG”>
                <apex:column value=”{!PG.Name}”/>
            </apex:pageBlockTable> 
        </apex:outputPanel>

here PGList is a list variable.

Leave a Reply