I have multiple command buttons in my JSF ... Its a database search which has one 'Search' button and the other 'Add' button.
When clicking on 'Search' Button i wanted a status to be displayed, so i added the below ajaxStatus code to my outputPanel which is in form1 where my search results are displayed.
<p:ajaxStatus onstart="statusDialog1.show();" onsuccess="statusDialog1.hide();"/>
Dialog Box
<p:dialog modal="true" widgetVar="statusDialog1" header="Searching ... Please wait"
draggable="false" closable="false" resizable="False">
<p:graphicImage value="/resources/ajax-loader.gif" />
</p:dialog>
When the 'Add' button is clicked, another dialog box opens which has form2, now the problem is when i click on 'Add' Button statusDialog1 is shown as well, i want that status to be shown only when 'Search' button is clicked.
How do i use multiple agaxStatus messages in the same page ?