/** * An override which checks if the web.xml security constraint has been triggered during this ajax request * (which can happen when the session has been timed out) and if so, then perform a redirect to the originally * requested page. Otherwise the enduser ends up with an ajax response containing only the new view state * without any form of visual feedback. */ @Override public void processPartial(PhaseId phaseId) { if (phaseId == PhaseId.RENDER_RESPONSE && redirectToFormLoginPageIfNecessary()) { return; } super.processPartial(phaseId); }
/** * An override which checks if the web.xml security constraint has been triggered during this ajax request * (which can happen when the session has been timed out) and if so, then perform a redirect to the originally * requested page. Otherwise the enduser ends up with an ajax response containing only the new view state * without any form of visual feedback. */ @Override public void processPartial(PhaseId phaseId) { if (phaseId == PhaseId.RENDER_RESPONSE && redirectToFormLoginPageIfNecessary()) { return; } super.processPartial(phaseId); }
@Override public void processPartial(PhaseId phaseId) { // If processing a partial request during the "Apply Request Values" phase of the JSF lifecycle, then register // a callback that will save-off the values of the components that are visited in the tree-walk. if (phaseId == PhaseId.APPLY_REQUEST_VALUES) { VisitContextFactory visitContextFactory = (VisitContextFactory) FactoryFinder.getFactory( FactoryFinder.VISIT_CONTEXT_FACTORY); Collection<String> renderIds = wrappedPartialViewContext.getExecuteIds(); EnumSet<VisitHint> visitHints = EnumSet.of(VisitHint.EXECUTE_LIFECYCLE); VisitContext visitContext = visitContextFactory.getVisitContext(facesContext, renderIds, visitHints); VisitCallback visitCallback = new VisitCallbackApplyRequestValuesImpl(valueMap, validMap); facesContext.getViewRoot().visitTree(visitContext, visitCallback); } // Otherwise, if processing a partial request during the "Render Response" phase of the JSF lifecycle, then // register a callback that will remove extraneous FacesMessages for components that are visited in the // tree-walk. else if (phaseId == PhaseId.RENDER_RESPONSE) { VisitContextFactory visitContextFactory = (VisitContextFactory) FactoryFinder.getFactory( FactoryFinder.VISIT_CONTEXT_FACTORY); Collection<String> renderIds = wrappedPartialViewContext.getExecuteIds(); EnumSet<VisitHint> visitHints = EnumSet.of(VisitHint.EXECUTE_LIFECYCLE); VisitContext visitContext = visitContextFactory.getVisitContext(facesContext, renderIds, visitHints); VisitCallback visitCallback = new VisitCallbackRenderResponseImpl(facesContext, valueMap, validMap); facesContext.getViewRoot().visitTree(visitContext, visitCallback); } // Ask the delegation chain to continue partial request processing. super.processPartial(phaseId); }
@Override public void processPartial(PhaseId phaseId) { // If processing a partial request during the "Apply Request Values" phase of the JSF lifecycle, then register // a callback that will save-off the values of the components that are visited in the tree-walk. if (phaseId == PhaseId.APPLY_REQUEST_VALUES) { VisitContextFactory visitContextFactory = (VisitContextFactory) FactoryFinder.getFactory( FactoryFinder.VISIT_CONTEXT_FACTORY); Collection<String> renderIds = wrappedPartialViewContext.getExecuteIds(); EnumSet<VisitHint> visitHints = EnumSet.of(VisitHint.EXECUTE_LIFECYCLE); VisitContext visitContext = visitContextFactory.getVisitContext(facesContext, renderIds, visitHints); VisitCallback visitCallback = new VisitCallbackApplyRequestValuesImpl(); facesContext.getViewRoot().visitTree(visitContext, visitCallback); } // Otherwise, if processing a partial request during the "Render Response" phase of the JSF lifecycle, then // register a callback that will remove extraneous FacesMessages for components that are visited in the // tree-walk. else if (phaseId == PhaseId.RENDER_RESPONSE) { VisitContextFactory visitContextFactory = (VisitContextFactory) FactoryFinder.getFactory( FactoryFinder.VISIT_CONTEXT_FACTORY); Collection<String> renderIds = wrappedPartialViewContext.getExecuteIds(); EnumSet<VisitHint> visitHints = EnumSet.of(VisitHint.EXECUTE_LIFECYCLE); VisitContext visitContext = visitContextFactory.getVisitContext(facesContext, renderIds, visitHints); VisitCallback visitCallback = new VisitCallbackRenderResponseImpl(); facesContext.getViewRoot().visitTree(visitContext, visitCallback); } // Ask the delegation chain to continue partial request processing. super.processPartial(phaseId); }
@Override public void processPartial(PhaseId phaseId) { // If processing a partial request during the "Apply Request Values" phase of the JSF lifecycle, then register // a callback that will save-off the values of the components that are visited in the tree-walk. if (phaseId == PhaseId.APPLY_REQUEST_VALUES) { VisitContextFactory visitContextFactory = (VisitContextFactory) FactoryFinder.getFactory( FactoryFinder.VISIT_CONTEXT_FACTORY); Collection<String> renderIds = wrappedPartialViewContext.getExecuteIds(); EnumSet<VisitHint> visitHints = EnumSet.of(VisitHint.EXECUTE_LIFECYCLE); VisitContext visitContext = visitContextFactory.getVisitContext(facesContext, renderIds, visitHints); VisitCallback visitCallback = new VisitCallbackApplyRequestValuesImpl(); facesContext.getViewRoot().visitTree(visitContext, visitCallback); } // Otherwise, if processing a partial request during the "Render Response" phase of the JSF lifecycle, then // register a callback that will remove extraneous FacesMessages for components that are visited in the // tree-walk. else if (phaseId == PhaseId.RENDER_RESPONSE) { VisitContextFactory visitContextFactory = (VisitContextFactory) FactoryFinder.getFactory( FactoryFinder.VISIT_CONTEXT_FACTORY); Collection<String> renderIds = wrappedPartialViewContext.getExecuteIds(); EnumSet<VisitHint> visitHints = EnumSet.of(VisitHint.EXECUTE_LIFECYCLE); VisitContext visitContext = visitContextFactory.getVisitContext(facesContext, renderIds, visitHints); VisitCallback visitCallback = new VisitCallbackRenderResponseImpl(); facesContext.getViewRoot().visitTree(visitContext, visitCallback); } // Ask the delegation chain to continue partial request processing. super.processPartial(phaseId); }
super.processPartial(phaseId);