Package javax.faces.flow

Examples of javax.faces.flow.FlowHandler


                }
                if (null != url && matches.hasMoreElements()) {
                    boolean keepGoing = true;
                    FacesContext context = FacesContext.getCurrentInstance();
                    Application application = context.getApplication();
                    FlowHandler fh = application.getFlowHandler();
                    Flow currentFlow = fh.getCurrentFlow(context);
                    do {
                        if (null != currentFlow && 0 < currentFlow.getDefiningDocumentId().length()) {
                            String definingDocumentId = currentFlow.getDefiningDocumentId();
                            ExternalContext extContext = context.getExternalContext();
                            ApplicationAssociate associate = ApplicationAssociate.getInstance(extContext);
View Full Code Here


       
        return result;
    }
   
    private static Flow getCurrentFlow(FacesContext context) {
        FlowHandler flowHandler = context.getApplication().getFlowHandler();
        if (null == flowHandler) {
            return null;
        }
       
        Flow result = flowHandler.getCurrentFlow(context);
       
        return result;
       
    }
View Full Code Here

            synchronized (flowScopedBeanMap) {
                result = (T) flowScopedBeanMap.get(contextual);
                if (null == result) {
                   
                    FacesContext facesContext = FacesContext.getCurrentInstance();
                    FlowHandler flowHandler = facesContext.getApplication().getFlowHandler();
                   
                    if (null == flowHandler) {
                        return null;
                    }
                   
                    FlowBeanInfo fbi = flowIds.get(contextual);
                    if (!flowHandler.isActive(facesContext, fbi.definingDocumentId, fbi.id)) {
                        throw new ContextNotActiveException("Request to activate bean in flow '" + fbi + "', but that flow is not active.");
                    }

                   
                    result = contextual.create(creational);
View Full Code Here

        Map<String, String> requestParamMap = context.getExternalContext().getRequestParameterMap();
        String toFlowDocumentId = requestParamMap.get(TO_FLOW_DOCUMENT_ID_REQUEST_PARAM_NAME);
        String flowId = requestParamMap.get(FLOW_ID_REQUEST_PARAM_NAME);
        if (null != toFlowDocumentId) {
            // don't use *this*, due to decoration
            FlowHandler fh = context.getApplication().getFlowHandler();
            Flow sourceFlow = fh.getCurrentFlow(context);
            Flow targetFlow = null;           
            FlowCallNode flowCallNode = null;
            // if this is not a return...
            if (null != flowId && !FlowHandler.NULL_FLOW.equals(toFlowDocumentId)) {
                targetFlow = fh.getFlow(context, toFlowDocumentId, flowId);
                if (null != targetFlow && null != sourceFlow) {
                    flowCallNode = sourceFlow.getFlowCall(targetFlow);
                }
            }
           
            fh.transition(context, sourceFlow, targetFlow, flowCallNode, context.getViewRoot().getViewId());
           
        }
    }
View Full Code Here

            } else {
                UIViewRoot newRoot = viewHandler.createView(context,
                                                            caseStruct.viewId);
                updateRenderTargets(context, caseStruct.viewId);
                context.setViewRoot(newRoot);
                FlowHandler flowHandler = context.getApplication().getFlowHandler();
                if (null != flowHandler) {
                    flowHandler.transition(context,
                            caseStruct.currentFlow, caseStruct.newFlow,
                            caseStruct.facesFlowCallNode, caseStruct.viewId);
                }
                if (logger.isLoggable(Level.FINE)) {
                    logger.log(Level.FINE, "Set new view in FacesContext for {0}", caseStruct.viewId);
View Full Code Here

        NavigationInfo info = null;
        if (null == navigationMaps) {
            createNavigationMaps();
            result = navigationMaps.get(ROOT_NAVIGATION_MAP_ID).ruleSet;
        } else {
            FlowHandler fh = context.getApplication().getFlowHandler();
            if (null != fh) {
                Flow currentFlow = fh.getCurrentFlow(context);
                if (null != currentFlow) {
                    info = navigationMaps.get(currentFlow.getDefiningDocumentId() + currentFlow.getId());
                    // We are in a flow, but there are no navigation rules for
                    // this flow.
                    if (null == info) {
View Full Code Here

    }
   
    private Set<String> getWildCardMatchList(FacesContext context) {
        Set<String> result = Collections.emptySet();
        NavigationInfo info = null;
        FlowHandler fh = context.getApplication().getFlowHandler();
        if (null != fh) {
            Flow currentFlow = fh.getCurrentFlow(context);
            if (null != currentFlow) {
                info = navigationMaps.get(currentFlow.getDefiningDocumentId() + currentFlow.getId());
            }
        }
        if (null == info) {
View Full Code Here

    private NavigationInfo getNavigationInfo(FacesContext context, String toFlowDocumentId, String flowId) {
        NavigationInfo result = null;
        assert(null != navigationMaps);
        result = navigationMaps.get(toFlowDocumentId + flowId);
        if (null == result) {
            FlowHandler fh = context.getApplication().getFlowHandler();
            if (null != fh) {
                Flow currentFlow = fh.getCurrentFlow(context);
                if (null != currentFlow) {
                    result = navigationMaps.get(currentFlow.getDefiningDocumentId() + currentFlow.getId());
                }
            }
        }
View Full Code Here

        // 3) elements specifying only from-action
        // 4) elements where both from-action and from-outcome are null
       
        CaseStruct result = determineViewFromActionOutcome(ctx, caseSet, fromAction, outcome, toFlowDocumentId);
        if (null != result) {
            FlowHandler flowHandler = ctx.getApplication().getFlowHandler();
            if (null != flowHandler) {
                result.currentFlow = flowHandler.getCurrentFlow(ctx);
                result.newFlow = result.currentFlow;
            }
        }

        return result;
View Full Code Here

            if (result != null) {
                break;
            }
        }
        if (null != result) {
            FlowHandler flowHandler = ctx.getApplication().getFlowHandler();
            if (null != flowHandler) {
                result.currentFlow = flowHandler.getCurrentFlow(ctx);
                result.newFlow = result.currentFlow;
            }
        }
       
        return result;
View Full Code Here

TOP

Related Classes of javax.faces.flow.FlowHandler

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.