/** * @see javax.faces.component.UIViewRoot#getAfterPhaseListener() */ public MethodExpression getAfterPhaseListener() { return original.getAfterPhaseListener(); }
private void notifyAfter(FacesContext context, PhaseId phaseId) { if (getAfterPhaseListener() != null || phaseListenerIterator != null) { notifyPhaseListeners(context, phaseId, false); } }
private void notifyAfter(FacesContext context, PhaseId phaseId) { if (getAfterPhaseListener() != null || phaseListenerIterator != null) { notifyPhaseListeners(context, phaseId, false); } }
private void notifyAfter(FacesContext context, PhaseId phaseId) { if (getAfterPhaseListener() != null || phaseListenerIterator != null) { notifyPhaseListeners(context, phaseId, false); } }
private void notifyAfter(FacesContext context, PhaseId phaseId) { if (getAfterPhaseListener() != null || phaseListenerIterator != null) { notifyPhaseListeners(context, phaseId, false); } }
private void notifyAfter(FacesContext context, PhaseId phaseId) { if (getAfterPhaseListener() != null || phaseListenerIterator != null) { notifyPhaseListeners(context, phaseId, false); } }
private void notifyAfter(FacesContext context, PhaseId phaseId) { if (getAfterPhaseListener() != null || phaseListenerIterator != null) { notifyPhaseListeners(context, phaseId, false); } }
private void notifyAfter(FacesContext context, PhaseId phaseId) { if (getAfterPhaseListener() != null || phaseListenerIterator != null) { notifyPhaseListeners(context, phaseId, false); } }
private void notifyAfter(FacesContext context, PhaseId phaseId) { if (getAfterPhaseListener() != null || phaseListenerIterator != null) { notifyPhaseListeners(context, phaseId, false); } }
private void notifyAfter(FacesContext context, PhaseId phaseId) { if (getAfterPhaseListener() != null || phaseListenerIterator != null) { notifyPhaseListeners(context, phaseId, false); } }
private void notifyAfter(FacesContext context, PhaseId phaseId) { if (getAfterPhaseListener() != null || phaseListenerIterator != null) { notifyPhaseListeners(context, phaseId, false); } }
public void encodeEnd(FacesContext context) throws java.io.IOException { checkNull(context, "context"); super.encodeEnd(context); try { notifyListeners(context, PhaseId.RENDER_RESPONSE, getAfterPhaseListener(), false); } catch (Exception e) { // following the spec we have to swallow the exception logger.log(Level.SEVERE, "Exception while processing phase listener: " + e.getMessage(), e); } }
/** * Notify afterPhase listener that is registered on the View Root. * @param context the FacesContext for the current request * @param lifecycle lifecycle instance */ private void notifyAfter(FacesContext context, Lifecycle lifecycle) { UIViewRoot viewRoot = context.getViewRoot(); if (null == viewRoot) { return; } MethodExpression afterPhase = viewRoot.getAfterPhaseListener(); if (null != afterPhase) { try { PhaseEvent event = new PhaseEvent(context, PhaseId.RESTORE_VIEW, lifecycle); afterPhase.invoke(context.getELContext(), new Object[]{event}); } catch (Exception e) { if (LOGGER.isLoggable(Level.SEVERE)) { LOGGER.log(Level.SEVERE, "severe.component.unable_to_process_expression", new Object[] { afterPhase.getExpressionString(), ("afterPhase")}); } return; } } }
/** * Notify afterPhase listener that is registered on the View Root. * @param context the FacesContext for the current request * @param lifecycle lifecycle instance */ private void notifyAfter(FacesContext context, Lifecycle lifecycle) { UIViewRoot viewRoot = context.getViewRoot(); if (null == viewRoot) { return; } MethodExpression afterPhase = viewRoot.getAfterPhaseListener(); if (null != afterPhase) { try { PhaseEvent event = new PhaseEvent(context, PhaseId.RESTORE_VIEW, lifecycle); afterPhase.invoke(context.getELContext(), new Object[]{event}); } catch (Exception e) { if (LOGGER.isLoggable(Level.SEVERE)) { LOGGER.log(Level.SEVERE, "severe.component.unable_to_process_expression", new Object[] { afterPhase.getExpressionString(), ("afterPhase")}); } return; } } }
/** * Notify afterPhase listener that is registered on the View Root. * @param context the FacesContext for the current request * @param lifecycle lifecycle instance */ private void notifyAfter(FacesContext context, Lifecycle lifecycle) { UIViewRoot viewRoot = context.getViewRoot(); if (null == viewRoot) { return; } MethodExpression afterPhase = viewRoot.getAfterPhaseListener(); if (null != afterPhase) { try { PhaseEvent event = new PhaseEvent(context, PhaseId.RESTORE_VIEW, lifecycle); afterPhase.invoke(context.getELContext(), new Object[]{event}); } catch (Exception e) { if (LOGGER.isLoggable(Level.SEVERE)) { LOGGER.log(Level.SEVERE, "severe.component.unable_to_process_expression", new Object[] { afterPhase.getExpressionString(), ("afterPhase")}); } return; } } }
/** * Notify afterPhase listener that is registered on the View Root. * @param context the FacesContext for the current request * @param lifecycle lifecycle instance */ private void notifyAfter(FacesContext context, Lifecycle lifecycle) { UIViewRoot viewRoot = context.getViewRoot(); if (null == viewRoot) { return; } MethodExpression afterPhase = viewRoot.getAfterPhaseListener(); if (null != afterPhase) { try { PhaseEvent event = new PhaseEvent(context, PhaseId.RESTORE_VIEW, lifecycle); afterPhase.invoke(context.getELContext(), new Object[]{event}); } catch (Exception e) { if (LOGGER.isLoggable(Level.SEVERE)) { LOGGER.log(Level.SEVERE, "severe.component.unable_to_process_expression", new Object[] { afterPhase.getExpressionString(), ("afterPhase")}); } return; } } }
/** * Invoke afterPhase MethodExpression of UIViewRoot. * Note: In this phase it is not possible to invoke the beforePhase method, because we * first have to restore the view to get its attributes. Also it is not really possible * to call the afterPhase method inside of UIViewRoot for this phase, thus it was decided * in the JSF 2.0 spec rev A to put this here. * @param facesContext */ private void _invokeViewRootAfterPhaseListener(FacesContext facesContext) { // 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) { log.log(Level.SEVERE, "An Exception occured while processing " + afterPhaseExpression.getExpressionString() + " in Phase " + getPhase(), t); } } }
/** * Invoke afterPhase MethodExpression of UIViewRoot. * Note: In this phase it is not possible to invoke the beforePhase method, because we * first have to restore the view to get its attributes. Also it is not really possible * to call the afterPhase method inside of UIViewRoot for this phase, thus it was decided * in the JSF 2.0 spec rev A to put this here. * @param facesContext */ private void _invokeViewRootAfterPhaseListener(FacesContext facesContext) { // 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) { log.log(Level.SEVERE, "An Exception occured while processing " + afterPhaseExpression.getExpressionString() + " in Phase " + getPhase(), t); } } }
/** * Invoke afterPhase MethodExpression of UIViewRoot. * Note: In this phase it is not possible to invoke the beforePhase method, because we * first have to restore the view to get its attributes. Also it is not really possible * to call the afterPhase method inside of UIViewRoot for this phase, thus it was decided * in the JSF 2.0 spec rev A to put this here. * @param facesContext */ private void _invokeViewRootAfterPhaseListener(FacesContext facesContext) { // 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) { log.log(Level.SEVERE, "An Exception occured while processing " + afterPhaseExpression.getExpressionString() + " in Phase " + getPhase(), t); } } }
private boolean process(FacesContext context, PhaseId phaseId, Processor processor, boolean broadcast) { if (!notifyListeners(context, phaseId, getBeforePhaseListener(), true)) { if (processor != null) processor.process(); if (broadcast) { _broadcastForPhase(phaseId); if (context.getRenderResponse() || context.getResponseComplete()) { clearEvents(); } } } return notifyListeners(context, phaseId, getAfterPhaseListener(), false); }