2 Replies Latest reply on May 19, 2009 12:40 AM by Israel Fonseca

    Exceptions and Messages

    Israel Fonseca Apprentice

      Is there any way to catch an exception and instead doing a redirect just swallow it, and add a facesMessage?

      I'm asking that to do something refreshless with ajax and using Seam exception handling. Somethin like user clicking in a button (ajax submit), and if an error happens it just add a facesMessage and reRender (using richfaces) the rich:messages component.

      Is that possible?



        • 1. Re: Exceptions and Messages
          Arbi Sookazian Master

          from Practical RF book:

          Displaying an error message is a common task, so the RichFaces team built a component that
          basically combines <a4j:outputPanel ajaxRendered="true"> and <h:message> (or <h:messages>).
          The component is called <rich:message> (or <rich:messages>). What this means is that this
          component will always be updated without you having to rerender it or put it inside a placeholder.

          • 2. Re: Exceptions and Messages
            Israel Fonseca Apprentice

            I know about this component. The problem is: I want to use Seam Page's Exception Handling, in an AJAX way. The pages.xml does a redirect when a exception is throw, i want to add a facesMessage when an exception is throw without a redirect.

            I think that's not possible indeed. But i need an confirmation.

            Thks in advance,