I have a visualforce page in which I have added a search functionality. Based on the search results a table gets populated. What I want to add here is that if the search returns no results, I want to populate a text label which would let the user know that search did not return any results and to change the search string. How can I do this?

  • can you post your code, the answer could be simple or complicated based on your code
    – Rao
    Commented May 2, 2014 at 20:18

1 Answer 1


solution for your issue is given in this post.


    <apex:pageBlockTable value="{!innerContactList}" var="innerCont" rendered="{!(innerContactList.size != 0)}">
   (pageBlockTable stuff)
<apex:outputText rendered="{!(innerContactList.size = 0)}" value="There are no contacts to display." />

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .