Package javax.faces.event

Examples of javax.faces.event.AbortProcessingException


        UICommand button = (UICommand) root.findComponent("mainForm:button1");
        Assert.assertNotNull(button);
       
        ExceptionBean bean = EasyMock.createMock(ExceptionBean.class);
        EasyMock.expect(bean.doSomeAction()).andThrow(new AbortProcessingException());
        // Setup is finished need to activate the mock
        EasyMock.replay(bean);
               
        request.setAttribute("bean", bean);
               
View Full Code Here


        Assert.assertNotNull(button);
       
        //ActionEvent event = new ActionEvent(button);
        ExceptionBean bean = EasyMock.createMock(ExceptionBean.class);
        bean.doSomeActionListener((ActionEvent)EasyMock.anyObject());
        EasyMock.expectLastCall().andThrow(new AbortProcessingException());
        // Setup is finished need to activate the mock
        EasyMock.replay(bean);
               
        request.setAttribute("bean", bean);
               
View Full Code Here

            public void invokeContextCallback(FacesContext context, UIComponent target)
            {
                Object submittedValue = "Hello!";
                ExceptionBean bean = EasyMock.createStrictMock(ExceptionBean.class);
                bean.valueChangeListenerMe((ValueChangeEvent)EasyMock.anyObject());
                EasyMock.expectLastCall().andThrow(new AbortProcessingException());
                // Setup is finished need to activate the mock
                EasyMock.replay(bean);
               
                request.setAttribute("bean", bean);
               
View Full Code Here

   
    public void processAction(ActionEvent actionEvent) throws AbortProcessingException
    {
       
        if( target == null )
            throw new AbortProcessingException("@target has not been set");

        if( value == null )
            throw new AbortProcessingException("@value has not been set");
       
        FacesContext ctx = FacesContext.getCurrentInstance();
       
        if( ctx == null )
            throw new AbortProcessingException("FacesContext ctx is null");
       
        ELContext ectx = ctx.getELContext();
       
        if( ectx == null )
            throw new AbortProcessingException("ELContext ectx is null");
       
        // TODO use a Converter before calling setValue
       
        target.setValue(ectx, value.getValue(ectx));
       
View Full Code Here

                {
                    phasesInstance = ClassUtils.newInstance((String)type.getValue(currentFacesContext.getELContext()));
                }
                catch (FacesException ex)
                {
                    throw new AbortProcessingException(ex.getMessage(), ex);
                }
            }
            return (PhaseListener)phasesInstance;

        }
View Full Code Here

                {
                    phasesInstance = ClassUtils.newInstance((String)type.getValue(currentFacesContext.getELContext()));
                }
                catch (FacesException ex)
                {
                    throw new AbortProcessingException(ex.getMessage(), ex);
                }
            }
            return (PhaseListener)phasesInstance;

        }
View Full Code Here

    public void processAction(ActionEvent actionEvent) throws AbortProcessingException
    {
       
        if( target == null )
        {
            throw new AbortProcessingException("@target has not been set");
        }

        if( value == null )
        {
            throw new AbortProcessingException("@value has not been set");
        }
       
        FacesContext ctx = FacesContext.getCurrentInstance();
       
        if( ctx == null )
        {
            throw new AbortProcessingException("FacesContext ctx is null");
        }
       
        ELContext ectx = ctx.getELContext();
       
        if( ectx == null )
        {
            throw new AbortProcessingException("ELContext ectx is null");
        }
       
        // TODO use a Converter before calling setValue
       
        target.setValue(ectx, value.getValue(ectx));
View Full Code Here

                {
                    instance = (ValueChangeListener) ReflectionUtil.forName(this.type).newInstance();
                }
                catch (Exception e)
                {
                    throw new AbortProcessingException("Couldn't Lazily instantiate ValueChangeListener", e);
                }
                if (this.binding != null)
                {
                    binding.setValue(faces.getELContext(), instance);
                }
View Full Code Here

                {
                    instance = (ActionListener) ReflectionUtil.forName(this.type).newInstance();
                }
                catch (Exception e)
                {
                    throw new AbortProcessingException("Couldn't Lazily instantiate ValueChangeListener", e);
                }
                if (this.binding != null)
                {
                    binding.setValue(faces.getELContext(), instance);
                }
View Full Code Here

            }
            catch (Exception e)
            {

                Throwable cause = e;
                AbortProcessingException ape = null;
                do
                {
                    if (cause != null && cause instanceof AbortProcessingException)
                    {
                        ape = (AbortProcessingException) cause;
View Full Code Here

TOP

Related Classes of javax.faces.event.AbortProcessingException

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.