I have a usecase where there will be a webservice call in the backend when clicked on a button. I have used p:commandbutton.If the web service call is successful then I need to display an overlaypanel with a message and if not successful, I need to show an error message. The necessary web service call is invoked from the button click. But how to capture the response if it is successful or not, and then display either the overlaypanel Or error message based on the response.
Is there any way to capture the response in the xhtml after the action invoked through actionListener ajax command button.