You need to sign in to do that
Don't have an account?
Uday Menkurkar
apex if else
How do I use "IF/ELSE" logic (or something better) to avoid displaying a pageblock completely if the related list is empty. In the code below, a pageblock gets displayed that shows a certain list that is related list. It is possible that the related list is empty. The problem is that even if the relatedList has no data, an empty block "Higher Probability" gets displayed. How do I avoid displaying the pageBlock completely if the relatedList is empty?
Thanks
Thanks
<apex:pageBlock title="Higher Probability"> <apex:pageBlockTable value="{! highLikelihoodDeals }" var="ds"> <apex:column value="{! ds.Issuer__c }"/> <apex:column headerValue="Bids Due" value="{! ds.Circle_Due_Date__c }"/> <apex:column headerValue="Maturities"> <apex:pageBlockTable value="{!ds.Tranches__r}" var="val"> <apex:column headerValue="Tenor" value="{! val.name }"/> </apex:pageBlockTable> </apex:column> <apex:column headerValue="Comments" value="{! ds.Deal_Description__c }"/> </apex:pageBlockTable> </apex:pageBlock>
Hi Uday,
try using rendered="{! highLikelihoodDeals.size>0}" in page block tag