Package javax.faces.lifecycle

Examples of javax.faces.lifecycle.Lifecycle.addPhaseListener()


            }
            Lifecycle lifecycle =
                    factory.getLifecycle(lifecycleId);
            if (webConfig.getBooleanContextInitParameter(
                  BooleanWebContextInitParameter.ExternalizeJavaScript)) {
                lifecycle.addPhaseListener(new JsfJsResourcePhaseListener());
            }
            for (int i = 0, len = listeners.length; i < len; i++) {
                if (LOGGER.isLoggable(Level.FINER)) {
                    LOGGER.finer(MessageFormat.format("addPhaseListener({0})", listeners[i]));
                }
View Full Code Here


                if (LOGGER.isLoggable(Level.FINER)) {
                    LOGGER.finer(MessageFormat.format("addPhaseListener({0})", listeners[i]));
                }
                try {
                    Class clazz = Util.loadClass(listeners[i], this);
                    lifecycle.addPhaseListener((PhaseListener) clazz.newInstance());
                } catch (Exception e) {
                    Object [] args = {MessageFormat.format("phase-listener: {0}", listeners[i])};
                    String message =
                        MessageUtils.getExceptionMessageString(MessageUtils.CANT_INSTANTIATE_CLASS_ERROR_MESSAGE_ID,  args);
                    LOGGER.log(Level.SEVERE, message);
View Full Code Here

            // add phase listeners
            for (String listenerClassName : getDispenser().getLifecyclePhaseListeners())
            {
                try
                {
                    lifecycle.addPhaseListener((PhaseListener)
                            ClassUtils.newInstance(listenerClassName, PhaseListener.class));
                }
                catch (ClassCastException e)
                {
                    log.severe("Class " + listenerClassName + " does not implement PhaseListener");
View Full Code Here

            // if ProjectStage is Development, install the DebugPhaseListener
            FacesContext facesContext = FacesContext.getCurrentInstance();
            if (facesContext.isProjectStage(ProjectStage.Development) &&
                    MyfacesConfig.getCurrentInstance(facesContext.getExternalContext()).isDebugPhaseListenerEnabled())
            {
                lifecycle.addPhaseListener(new DebugPhaseListener());
            }
        }
    }

    /*
 
View Full Code Here

            // add phase listeners
            for (String listenerClassName : getDispenser().getLifecyclePhaseListeners())
            {
                try
                {
                    lifecycle.addPhaseListener((PhaseListener)
                            ClassUtils.newInstance(listenerClassName, PhaseListener.class));
                }
                catch (ClassCastException e)
                {
                    log.severe("Class " + listenerClassName + " does not implement PhaseListener");
View Full Code Here

            // if ProjectStage is Development, install the DebugPhaseListener
            FacesContext facesContext = FacesContext.getCurrentInstance();
            if (facesContext.isProjectStage(ProjectStage.Development) &&
                    MyfacesConfig.getCurrentInstance(facesContext.getExternalContext()).isDebugPhaseListenerEnabled())
            {
                lifecycle.addPhaseListener(new DebugPhaseListener());
            }
        }
    }

    /*
 
View Full Code Here

        for (Iterator iterator = getDispenser().getLifecyclePhaseListeners(); iterator.hasNext();)
        {
            String listenerClassName = (String) iterator.next();
            try
            {
                lifecycle.addPhaseListener((PhaseListener) ClassUtils.newInstance(listenerClassName));
            }
            catch (ClassCastException e)
            {
                log.error("Class " + listenerClassName + " does not implement PhaseListener");
            }
View Full Code Here

                                           MessageFormat.format(
                                                "Adding PhaseListener ''{0}'' to lifecycle ''{0}}",
                                                pl,
                                                lfId));
                            }
                            lifecycle.addPhaseListener((PhaseListener) plInstance);
                        }
                    }
                }
            }
        }
View Full Code Here

    Lifecycle lifecycle = getConfig().getFacesLifecycle();
    for (PhaseListener listener : lifecycle.getPhaseListeners()) {
           if(SeamPhaseListener.class.equals(listener.getClass())){
               lifecycle.removePhaseListener(listener);
                  seamListenerWrapper = new SeamPhaseListenerWrapper(listener);
                  lifecycle.addPhaseListener(seamListenerWrapper);
            }
        }
    if(null == seamListenerWrapper){
      seamListenerWrapper = new SeamPhaseListenerWrapper(null);
    }
View Full Code Here

                }
                if (!foundExistingListenerInstance) {
                    if (null == listener) {
                        listener = new HttpMethodRestrictionsPhaseListener();
                    }
                    cur.addPhaseListener(listener);
                }
            }
        }

View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.