Skip to main content

Posts

Showing posts with the label List size check in Vf Page

How to check list size in Visualforce page

Hi All, It seems to very simple by name but not as much simple as you are thinking now.As we all know list itself has a method so called size() to check its size,however we can write list.size() in controller, which will return no. of elements present in the list otherwise return 0 if no elements present .But we can not write list.size method in visual-force page,then how will we check ???? For that I have done a workaround, one visual-force page is there having one field Account Type. When Account Type will be selected with some value ,then list of Accounts records will be displayed whose Account Type is matched with the selected value otherwise a message saying No Accounts Present in this Type. Here is page:- <apex:page controller="passingParamActionFuncController">     <apex:form >         <apex:pageBlock title="Account Information" id="pb">             <apex:pageBlockSection >   ...