Uploaded image for project: 'RichFaces'
  1. RichFaces
  2. RF-11805

a4j:queue onerror doesn't seem to work

    XMLWordPrintable

    Details

      Description

      I was just testing some 'global' ajax error handling code. I put an <a4j:queue onerror="alert('A')"/>
      outside a form, then forced an ajax error like this:

      <h:inputText>
        <a4j:ajax event="blur" listener="#{myBean.forceAjaxError}"/>
      </h:inputText>
      
       
      public void forceAjaxError(AjaxBehaviorEvent event) {
              getResponse().setStatus(501);
      }
       
      public HttpServletResponse getResponse() {
              return (HttpServletResponse) FacesContext.getCurrentInstance().getExternalContext().getResponse();
      }
      

      so I click into and out of the input, the ajax POST request completes with a 501 status but no alert is shown.
      I just tried it with a4j:status and this does pick up the error.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  michpetrov Michal Petrov
                  Reporter:
                  healeyb Brendan Healey
                • Votes:
                  2 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: