Package javax.faces.lifecycle

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


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


      // exposes the PPR where the one in the ExternalContext doesn't
      processIncomingPublicRenderParameters(context, request);
     
      // add self as PhaseListener to prevent action phase from executing (after restoreView)
      Lifecycle lifecycle = getLifecycle();
      lifecycle.addPhaseListener(this);

      // For actions we only execute the lifecycle phase
      lifecycle.execute(context);
     
      // call the eventhandler to process
View Full Code Here

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

View Full Code Here

                                           MessageFormat.format(
                                                "Adding PhaseListener ''{0}'' to lifecycle ''{0}}",
                                                pl,
                                                lfId));
                            }
                            lifecycle.addPhaseListener((PhaseListener) plInstance);
                        }
                    }
                }
            }
        }
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))
        {
            lifecycle.addPhaseListener(new DebugPhaseListener());
        }
    }

    private String getLifecycleId()
    {
View Full Code Here

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

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

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

                                           MessageFormat.format(
                                                "Adding PhaseListener ''{0}'' to lifecycle ''{0}}",
                                                pl,
                                                lfId));
                            }
                            lifecycle
                                 .addPhaseListener((PhaseListener) plInstance);
                        }
                    }
                }
            }
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.