You need to sign in to do that
Don't have an account?
Shikibu
Determine array length in VF markup?
I have several pages that contain repeating components (like dataTable) for arrays, which should not be rendered if the array size is zero. Is there a way to accomplish this in VF markup, without having to create a new public property in apex that exposes the size of the array?
<apex:pageBlockSection title="Assets" rendered="{!renderAssetsForContact}"><apex:dataTable value="{!assetsForContact}" var="asset">
public Boolean renderAssetsForContact { get { return assetsForContact.size() > 1; }}
{!assetsForContact.size}