1

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?

1
  • 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

3

solution for your issue is given in this post.

https://developer.salesforce.com/forums/ForumsMain?id=906F000000097e1IAA

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

You must log in to answer this question.

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