You can do it easily and in a centralized manner using an extension of the default action listener. Here, all exceptions thrown by actions are captured, so you can plug your own exception handling logic ;-)
Regards.
On 5/26/06, Aleksei Valikov <[EMAIL PROTECTED]> wrote:
Hi.
In JSF, validating "fields" works like a sharm. A validator checks the value and
queues a message if anything's wrong. The message is the displayed by the
h:message/h:messages tags/handlers within the page.
My question is - what is the analogue for this for actions? Imagine I have an
action like "delete document" and when invoked it fails for some reason. How
could I diagnose and handle the problem? For instance, if I get a
DocumentNotExistsException, I know it's no the end of the days, I just have to
queue a "documentNotExsists" message which would then be displayed in the page.
But how does this work programmatically?
Thank you for your time.
Bye.
/lexi

