Tutorial :In richfaces form based error message possible?



Question:

I would like a catch-all display of any errors or exceptions. For instance I would like to catch 500 responses to AJAX requests and display the summary in a text field. More so I would like a single message area for the entire form (w/o specifying a separate message tag for every input or button). How can this be implemented using richfaces?

I've read the documentation located at the richfaces demo site, but the 500 responses still get through.


Solution:1

For displaying all validation errors in your form in a single location use the <rich:messages/> component instead of the <rich:message> as shown in: http://livedemo.exadel.com/richfaces-demo/richfaces/messages.jsf


Solution:2

As I look around I think my paradigm is wrong. I was thinking I would catch an HTML error code on return, but it looks like richfaces catches it server side and turns it into a page to display the details on the front end. I'll look into how to set up faces-config to redirect to one of my classes or maybe just create an attribute in the bean that I set to the message in a catch block.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »