Package javax.faces.event

Examples of javax.faces.event.PhaseEvent


            boolean checkAfter) throws Throwable
    {
        expect(_lifecycleFactory.getLifecycle(eq(LifecycleFactory.DEFAULT_LIFECYCLE))).andReturn(_lifecycle);
        expect(_externalContext.getInitParameter(eq(FacesServlet.LIFECYCLE_ID_ATTR))).andReturn(null).anyTimes();

        PhaseEvent event = new PhaseEvent(_facesContext, phaseId, _lifecycle);

        if (expectSuperCall)
            _testimpl = _mocksControl.createMock(UIViewRoot.class, new Method[] { UIViewRoot.class.getMethod(
                    "isRendered", new Class[0]) });
View Full Code Here


        // get the UIViewRoot (note that it must not be null at this point)
        UIViewRoot root = facesContext.getViewRoot();
        MethodExpression afterPhaseExpression = root.getAfterPhaseListener();
        if (afterPhaseExpression != null)
        {
            PhaseEvent event = new PhaseEvent(facesContext, getPhase(), _getLifecycle(facesContext));
            try
            {
                afterPhaseExpression.invoke(facesContext.getELContext(), new Object[] { event });
            }
            catch (Throwable t)
View Full Code Here

                    beforePhaseSuccess = new boolean[listenerCount];
                    Arrays.fill(beforePhaseSuccess, true);
                }
            }
           
            PhaseEvent event = createEvent(context, phaseId);

            // only invoke the listener if we are in beforePhase
            // or if the related before PhaseListener finished without an Exception
            if (listener != null && (beforePhase || beforePhaseSuccess[0]))
            {
View Full Code Here

            {
                id = LifecycleFactory.DEFAULT_LIFECYCLE;
            }
            _lifecycle = factory.getLifecycle(id);
        }
        return new PhaseEvent(context, phaseId, _lifecycle);
    }
View Full Code Here

        // get the UIViewRoot (note that it must not be null at this point)
        UIViewRoot root = facesContext.getViewRoot();
        MethodExpression afterPhaseExpression = root.getAfterPhaseListener();
        if (afterPhaseExpression != null)
        {
            PhaseEvent event = new PhaseEvent(facesContext, getPhase(), _getLifecycle(facesContext));
            try
            {
                afterPhaseExpression.invoke(facesContext.getELContext(), new Object[] { event });
            }
            catch (Throwable t)
View Full Code Here

            boolean checkAfter) throws Throwable
    {
        expect(_lifecycleFactory.getLifecycle(eq(LifecycleFactory.DEFAULT_LIFECYCLE))).andReturn(_lifecycle);
        expect(_externalContext.getInitParameter(eq(FacesServlet.LIFECYCLE_ID_ATTR))).andReturn(null).anyTimes();

        PhaseEvent event = new PhaseEvent(_facesContext, phaseId, _lifecycle);

        if (expectSuperCall)
        {
            _testimpl = _mocksControl.createMock(UIViewRoot.class, new Method[]{UIViewRoot.class.getMethod(
                    "isRendered", new Class[0])});
View Full Code Here

      // Complete forwarded PrimeFaces ajax request
      LifecycleFactory factory = (LifecycleFactory) FactoryFinder
          .getFactory(FactoryFinder.LIFECYCLE_FACTORY);
      Lifecycle lifecycle = factory
          .getLifecycle(LifecycleFactory.DEFAULT_LIFECYCLE);
      new PrimeFacesPhaseListener().beforePhase(new PhaseEvent(
          FacesContext.getCurrentInstance(), PhaseId.RENDER_RESPONSE,
          lifecycle));
    }
  }
View Full Code Here

        }.init();
    }

    protected void processModelValidation()
    {
        new ModelValidationPhaseListener().afterPhase(new PhaseEvent(facesContext, PhaseId.UPDATE_MODEL_VALUES, lifecycle));
    }
View Full Code Here

    private void executeBeforePhaseOfCrossValidationPhaseListener()
    {
        for (PhaseListener listener : getPhaseListeners())
        {
            listener.beforePhase(new PhaseEvent(facesContext, PhaseId.RESTORE_VIEW, getLifeCycle()));
        }
    }
View Full Code Here

    }

    protected void processCrossValidation()
    {
        new CrossValidationPhaseListener().afterPhase(new PhaseEvent(
                facesContext, PhaseId.ANY_PHASE, lifecycle));
    }
View Full Code Here

TOP

Related Classes of javax.faces.event.PhaseEvent

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.