Package javax.faces.event

Examples of javax.faces.event.ExceptionQueuedEvent


        }
       
        int i = 0;
        for (Iterator<ExceptionQueuedEvent> it = facesContext.getExceptionHandler().getUnhandledExceptionQueuedEvents().iterator(); it.hasNext();)
        {
            ExceptionQueuedEvent eqe = it.next();
            Throwable e = eqe.getContext().getException();
            if (e instanceof AbortProcessingException && e.getCause() == null)
            {
                //Expected
                i++;
            }
View Full Code Here


        }
       
        int i = 0;
        for (Iterator<ExceptionQueuedEvent> it = facesContext.getExceptionHandler().getUnhandledExceptionQueuedEvents().iterator(); it.hasNext();)
        {
            ExceptionQueuedEvent eqe = it.next();
            Throwable e = eqe.getContext().getException();
            if (e instanceof AbortProcessingException)
            {
                Assert.fail("Unexpected exception queued", e);
            }
            else
View Full Code Here

            do
            {
                // For each ExceptionEvent in the list
               
                // get the event to handle
                ExceptionQueuedEvent event = unhandled.peek();
                try
                {
                    // call its getContext() method
                    ExceptionQueuedEventContext context = event.getContext();
                   
                    // and call getException() on the returned result
                    Throwable exception = context.getException();
                   
                    // Upon encountering the first such Exception that is not an instance of
View Full Code Here

    {
        if (_isAjaxRequest == null)
        {
            if (exceptionQueuedEvent instanceof ExceptionQueuedEvent)
            {
                ExceptionQueuedEvent eqe = (ExceptionQueuedEvent)exceptionQueuedEvent;
                ExceptionQueuedEventContext eqec = eqe.getContext();
                if (eqec != null)
                {
                    FacesContext facesContext = eqec.getContext();
                    if (facesContext != null)
                    {
View Full Code Here

    {
        //handle exceptions which occur in a phase-listener (beforePhase) for PhaseId.RENDER_RESPONSE
        //needed because #handle gets called too late in this case
        if (event instanceof ExceptionQueuedEvent)
        {
            ExceptionQueuedEvent exceptionQueuedEvent = (ExceptionQueuedEvent)event;
            FacesContext facesContext = exceptionQueuedEvent.getContext().getContext();

            if (facesContext.getCurrentPhaseId() == PhaseId.RENDER_RESPONSE &&
                exceptionQueuedEvent.getContext().inBeforePhase())
            {
                Throwable exception = getRootCause(exceptionQueuedEvent.getContext().getException());

                ExceptionToCatchEvent exceptionToCatchEvent = new ExceptionToCatchEvent(exception);
                this.beanManager.fireEvent(exceptionToCatchEvent);

                if (exceptionToCatchEvent.isHandled())
View Full Code Here

            do
            {
                // For each ExceptionEvent in the list
               
                // get the event to handle
                ExceptionQueuedEvent event = unhandled.peek();
                try
                {
                    // call its getContext() method
                    ExceptionQueuedEventContext context = event.getContext();
                   
                    // and call getException() on the returned result
                    Throwable exception = context.getException();
                   
                    // Upon encountering the first such Exception that is not an instance of
View Full Code Here

                do
                {
                    // For each ExceptionEvent in the list
                   
                    // get the event to handle
                    ExceptionQueuedEvent event = unhandled.peek();
                    try
                    {
                        // call its getContext() method
                        ExceptionQueuedEventContext context = event.getContext();
                       
                        // and call getException() on the returned result
                        Throwable exception = context.getException();
                       
                        if (errorHandlerClass != null)
View Full Code Here

         * Obtem o iterador para percorrer todas as exceções não tratadas
         * (unhandled exceptions), disparadas pela aplicação cliente.
         */
        Iterator i = getUnhandledExceptionQueuedEvents().iterator();
        while (i.hasNext()) {
            ExceptionQueuedEvent event = (ExceptionQueuedEvent) i.next();
            ExceptionQueuedEventContext context = (ExceptionQueuedEventContext) event.getSource();

            // Obtendo o objeto que representa a exceção.
            Throwable t = context.getException();
            try {
                // Realiza o tratamento da exceção.
View Full Code Here

                do
                {
                    // For each ExceptionEvent in the list
                   
                    // get the event to handle
                    ExceptionQueuedEvent event = unhandled.peek();
                    try
                    {
                        // call its getContext() method
                        ExceptionQueuedEventContext context = event.getContext();
                       
                        // and call getException() on the returned result
                        Throwable exception = context.getException();
                       
                        if (errorHandlerClass != null)
View Full Code Here

                do
                {
                    // For each ExceptionEvent in the list
                   
                    // get the event to handle
                    ExceptionQueuedEvent event = unhandled.peek();
                    try
                    {
                        // call its getContext() method
                        ExceptionQueuedEventContext context = event.getContext();
                       
                        // and call getException() on the returned result
                        Throwable exception = context.getException();

                        // spec described behaviour of PreJsf2ExceptionHandler
View Full Code Here

TOP

Related Classes of javax.faces.event.ExceptionQueuedEvent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.