0

I have a list of a wrapper class which i am using to display values in a pageblockTable.

I want to render this pageblock only when there are records.

I tried using the rendered tag on the pageblock

<apex:pageBlock id="pbmInput" rendered="{!if(wrapperList.size() > 0,true,false)}">

This doesnt allow me to save the VF page

i get the error

Error: Unknown function wrapperList.size. Check spelling

I could have in my controller check the size and accordingly store true or false on a boolean variable and use it.

none of the list function seem to work.. Empty() also doesnt work. Are functions not valid to be used in VF pages?

  • What is the body of the wrapperList class? – bigassforce May 17 '13 at 11:02
  • its a wrapper class holding task,contacts and leads.. The issue is not with the wrapper class – Prady May 17 '13 at 12:00
4

Take the () off the end of size so it reads

wrapperList.size not wrapperList.size()

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.