0 Replies Latest reply on Mar 30, 2011 6:36 AM by nias

    pages.xml error handling from ajax calls don't work

    nias

      hello,

       

       

      i'm using the PortletBridge 2.1.0.FINAL (and GateIn simple portal).

      The feature list says, that it was possible to use the seam error handling from pages.xml.

       

       

      But this won't work, if the call was done from ajax (for instance a4j:commandButton).

       

       

      for example:

       

       

      pages:xml:

          <exception>

              <redirect view-id="/error.xhtml">

                  <message>Test Error.</message>

              </redirect>

          </exception>

       

       

      Facelet:

              <h:panelGroup id="bla" layout="block" styleClass="content">

              <h:form>

                  <a4j:commandButton value="anlegen"

                                     action="#{bean.action()}"

                                     reRender="bla"

                          />

                  <rich:messages/>

              </h:form>

               </h:panelGroup>

       

       

      Seam Component "bean":

      @Name("bean")

      public class Test {

        public void action() throws Exception {

          throw new Exception("Test Error");

        }

      }

       

       

      This won't trigger the action from pages.xml. If i'm use a h:commandButton (non ajax call) it works as expected.

      If i'm try this from outside the portal (direct access to context-root) it works from an ajax call too.

       

       

      any suggestions?