cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Action error message

wiggum
Champ in-the-making
Champ in-the-making
Hi,

I'm running a custom action that is copying a file to another server, and I'd like to display error messages at the completion of the move as to whether or not the copy succeeded. 

So what's the best way to display a custom message to the user after the completion of a custom action?

Thanks!
Sean
1 REPLY 1

wiggum
Champ in-the-making
Champ in-the-making
Wanted to post the solution for reference (thanks support!):


FacesMessage facesMsg = new FacesMessage(FacesMessage.SEVERITY_INFO, msg, msg);
context.addMessage(null, facesMsg);

This then gets shown in the client via the "a:errors" tag (ignore the name, see browse.jsp as an example).