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 Answer
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." />