+ Start a Discussion
SandrineSandrine 

What happens if list is blank in visualforce page

Hello,

If i put rendered="{Qlist.Zone__c == 'Text' }"
<apex:outputPanel rendered="{Qlist.Zone__c == 'check' }">check present<br />
<apex:outputPanel rendered="{Qlist.Zone__c != 'check' }">check not present<br />

What happens if
1) Qlist is emplty or null
Best Answer chosen by Sandrine
Sukesh Kumar 33Sukesh Kumar 33
You will have to place the outputpanel's inside repeat, if you are making use of list and it has more than 1 item.

All Answers

SandrineSandrine
Also, is there way to optimiwe the code below
 
<apex:outputPanel rendered="{!Qlist.Zone__c == 'check' }">check present<br />
<apex:outputPanel rendered="{!Qlist.Zone__c != 'check' }">check not present<br />

 
Sukesh Kumar 33Sukesh Kumar 33
You will have to place the outputpanel's inside repeat, if you are making use of list and it has more than 1 item.
This was selected as the best answer