-
1. Re: Any way to return server side error message to datascroller when page forward clicked?
michpetrov Oct 6, 2014 3:27 AM (in response to achildress)The response contains pieces of HTML that are to be added/replaced on the page, since there is no component that would display the message it's not included. To show a FacesMessage use h:message or rich:message(s).
-
2. Re: Any way to return server side error message to datascroller when page forward clicked?
achildress Oct 6, 2014 11:33 AM (in response to michpetrov)Michal, I'm really interested in how to pass some sort of message/information back to the page via the ajax request object, so I can determine if the 500 ajax status was the result of an unexpected error, or an error I specifically sent back to the page for the purposes of informing the user of something. I realize that I can use rich:messages, but the A4J.AJAX.onError method I have defined at an application level is hijacking that process and forwarding to my error page, so the user never gets to see the rich:messages. I'm trying to put something in the ajax request object so that my A4J.AJAX.onError method can look for it and do something different instead of forwarding to my error page. Is there any way to do this?
-
3. Re: Any way to return server side error message to datascroller when page forward clicked?
michpetrov Oct 7, 2014 4:33 AM (in response to achildress)If you need to do different things based on the server response you can use a different status code, leave 500 for the server and send back 555 or something (status codes 512-599 are currently unassigned so you can use any one of those). Alternatively you can define navigation rules in faces-config.xml, so you can redirect to certain pages based on the result of a server-side function.
If you really need to modify the response you can implement a phaseListener and put something into the response during Render Response Phase.