Package javax.faces.event

Examples of javax.faces.event.PhaseListener


        // attribute is set, instantiate an instance of the specified class, and register it by calling
        // addPhaseListener(). If the binding attribute was also set, store the listener instance
        // by calling binding.setValue(). If there was an exception thrown, rethrow the
        // exception as a JspException.

        PhaseListener listener = null;
        try
        {
            listener = new BindingPhaseListener(binding, type);
        }
        catch (Exception ex)
View Full Code Here


            this.type = type;
        }

        public void afterPhase(PhaseEvent event)
        {
            PhaseListener listener = getPhaseListener();
            if (listener != null)
            {
                listener.afterPhase(event);
            }
        }
View Full Code Here

            }
        }

        public void beforePhase(PhaseEvent event)
        {
            PhaseListener listener = getPhaseListener();
            if (listener != null)
            {
                listener.beforePhase(event);
            }
        }
View Full Code Here

            }
        }

        public PhaseId getPhaseId()
        {
            PhaseListener listener = getPhaseListener();
            if (listener != null)
            {
                return listener.getPhaseId();
            }

            return null;

        }
View Full Code Here

                    {
                        continue;
                    }
                }

                PhaseListener phaseListener = createPhaseListenerInstance(phaseListenerClass);
                result.add(injectFields(phaseListener, advancedQualifierRequiredForDependencyInjection));
            }

            foundPhaseListeners.clear();
View Full Code Here

      return;
    }
    final PhaseEvent event = new PhaseEvent(facesContext, phaseId, lifecycle);

    for (int i = 0; i < phaseListeners.length; i++) {
      PhaseListener phaseListener = phaseListeners[i];
      if (isListenerForThisPhase(phaseListener, phaseId)) {
        try {
          phaseListener.beforePhase(event);
          beforePhaseSuccess[i] = true;
        } catch (Exception e) {
          beforePhaseSuccess[i] = false; // redundant - for clarity
          LOG.error("Exception in PhaseListener " + phaseId.toString() + " beforePhase.", e);
          return;
View Full Code Here

      return;
    }
    final PhaseEvent event = new PhaseEvent(facesContext, phaseId, lifecycle);

    for (int i = phaseListeners.length - 1; i >= 0; i--) {
      PhaseListener phaseListener = phaseListeners[i];
      if (isListenerForThisPhase(phaseListener, phaseId)
          && beforePhaseSuccess[i]) {
        try {
          phaseListener.afterPhase(event);
        } catch (Exception e) {
          LOG.error("Exception in PhaseListener " + phaseId.toString() + " afterPhase", e);
        }
      }
    }
View Full Code Here

    void informPhaseListenersBefore(PhaseId phaseId) {
        boolean[] beforePhaseSuccess = new boolean[phaseListeners.length];
        listenerSuccessMap.put(phaseId, beforePhaseSuccess);
       
        for (int i = 0; i < phaseListeners.length; i++) {
            PhaseListener phaseListener = phaseListeners[i];
            if (isListenerForThisPhase(phaseListener, phaseId)) {
                try {
                    phaseListener.beforePhase(new PhaseEvent(facesContext, phaseId, lifecycle));
                    beforePhaseSuccess[i] = true;
                } catch (Exception e) {
                    beforePhaseSuccess[i] = false; // redundant - for clarity
                    log.error("Exception in PhaseListener " + phaseId.toString() + " beforePhase.", e);
                    return;
View Full Code Here

    void informPhaseListenersAfter(PhaseId phaseId) {
        boolean[] beforePhaseSuccess = (boolean[])listenerSuccessMap.get(phaseId);
       
        for (int i = phaseListeners.length - 1; i >= 0; i--)  {
            PhaseListener phaseListener = phaseListeners[i];
            if (isListenerForThisPhase(phaseListener, phaseId)
                && beforePhaseSuccess[i]) {
                try {
                    phaseListener.afterPhase(new PhaseEvent(facesContext, phaseId, lifecycle));
                } catch (Exception e) {
                    log.error("Exception in PhaseListener " + phaseId.toString() + " afterPhase", e);
                }
            }
        }
View Full Code Here

                    {
                        continue;
                    }
                }

                PhaseListener phaseListener = createPhaseListenerInstance(phaseListenerClass);
                result.add(injectFields(phaseListener, advancedQualifierRequiredForDependencyInjection));
            }

            foundPhaseListeners.clear();
View Full Code Here

TOP

Related Classes of javax.faces.event.PhaseListener

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.