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


            }
            catch (Exception e)
            {

                Throwable cause = e;
                AbortProcessingException ape = null;
                do
                {
                    if (cause != null && cause instanceof AbortProcessingException)
                    {
                        ape = (AbortProcessingException) cause;
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

    if (methodExpression != null && event != null) {
      try {
        methodExpression.invoke(facesContext.getELContext(), new Object[]{event});
      } catch (final Exception e) {
        throw new AbortProcessingException(e);
      }
    }
  }
View Full Code Here

        }
        if (instance == null && type != null) {
            try {
                instance = ReflectionUtils.newInstance(((String) type.getValue(faces.getELContext())));
            } catch (Exception e) {
                throw new AbortProcessingException(e.getMessage(), e);
            }

            if (binding != null) {
                binding.setValue(faces.getELContext(), instance);
            }
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 = binding.getValue(currentFacesContext.getELContext());
            } else if (type != null) {
                try {
                    phasesInstance = ClassUtils.newInstance((String)type.getValue(currentFacesContext.getELContext()));
                } catch (FacesException ex) {
                    throw new AbortProcessingException(ex.getMessage(), ex);
                }
            }
            return (PhaseListener) phasesInstance;

        }
View Full Code Here

            if (instance == null && this.type != null) {
                try {
                    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

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

  }

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

    ELContext elContext = FacesContext.getCurrentInstance().getELContext();

    Object val = (Object) value.getValue(elContext);
   
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.