You need to sign in to do that
Don't have an account?
Pavan Renjal
Check if the list is empty in repeat tag before rendering List
Hi, I need to know how we can check if the list is empty before rendering it. I am not sure if i am doing it right in the below code:
<apex:repeat value="{!Contacts}" var="con"> <apex:commandLink value="{!con.Name}" rendered={!NOT(Contacts.size==0)}"/> </apex:repeat>
I would put a OutputPanel around the whole list:
Thanks for the reply. Somehow its not working for me. Let me check again and come back on this.
tbh, I'm not 100% on that formula. You might also try putting a getter on an extension or controller like:
And have the formula:
(or something similar - untested code there)