Package org.apache.myfaces.config.impl.digester.elements

Examples of org.apache.myfaces.config.impl.digester.elements.FacesFlowDefinitionImpl


            {
                // Zero lenght, if that so the flow definition must be implicitly derived.
                // See JSF 2.2 section 11.4.3.3
                //
                FacesConfig facesConfig = new org.apache.myfaces.config.impl.digester.elements.FacesConfigImpl();
                FacesFlowDefinitionImpl flow = new FacesFlowDefinitionImpl();
                String flowName = systemId.substring(systemId.lastIndexOf('/')+1, systemId.lastIndexOf("-flow.xml"));
                flow.setId(flowName);
                // In this case the defining document id is implicit associated
                flow.setDefiningDocumentId(systemId);
               
                String startNodePath = systemId.substring(0, systemId.lastIndexOf('/')+1)+flowName+".xhtml";
                URL startNodeUrl = ectx.getResource(startNodePath);
                if (startNodeUrl != null)
                {
                    flow.setStartNode(startNodePath);
                }
               
                // There is a default return node with name [flow-name]-return and
                // that by default points to an outer /[flow-name]-return outcome
                FacesFlowReturnImpl returnNode = new FacesFlowReturnImpl();
                returnNode.setId(flowName+"-return");
                NavigationCaseImpl returnNavCase = new NavigationCaseImpl();
                returnNavCase.setFromOutcome("/"+flowName+"-return");
                returnNode.setNavigationCase(returnNavCase);
                flow.addReturn(returnNode);
               
                facesConfig.getFacesFlowDefinitions().add(flow);
                return facesConfig;
            }
View Full Code Here


            {
                // Zero lenght, if that so the flow definition must be implicitly derived.
                // See JSF 2.2 section 11.4.3.3
                //
                FacesConfigImpl facesConfig = new FacesConfigImpl();
                FacesFlowDefinitionImpl flow = new FacesFlowDefinitionImpl();
                flow.setId(flowName);
                // In this case the defining document id is implicit associated
                flow.setDefiningDocumentId(systemId);
               
                String startNodePath = systemId.substring(0, systemId.lastIndexOf('/')+1)+flowName+".xhtml";
                //URL startNodeUrl = ectx.getResource(startNodePath);
                //if (startNodeUrl != null)
                //{
                flow.setStartNode(startNodePath);
                //}
               
                // There is a default return node with name [flow-name]-return and
                // that by default points to an outer /[flow-name]-return outcome
                FacesFlowReturnImpl returnNode = new FacesFlowReturnImpl();
                returnNode.setId(flowName+"-return");
                NavigationCaseImpl returnNavCase = new NavigationCaseImpl();
                returnNavCase.setFromOutcome("/"+flowName+"-return");
                returnNode.setNavigationCase(returnNavCase);
                flow.addReturn(returnNode);
               
                facesConfig.addFacesFlowDefinition(flow);
                return facesConfig;
            }

            if (log.isLoggable(Level.INFO))
            {
                log.info("Reading config " + systemId);
            }
           
            FacesConfigImpl facesConfig = (FacesConfigImpl)
                getUnmarshaller(ectx).getFacesConfig(pbstream, systemId);
           
            // Set default start node when it is not present.
            for (FacesFlowDefinition definition : facesConfig.getFacesFlowDefinitions())
            {
                if (flowName.equals(definition.getId()))
                {
                    FacesFlowDefinitionImpl flow = (FacesFlowDefinitionImpl) definition;
                    if (flow.getStartNode() == null)
                    {
                        String startNodePath = systemId.substring(0,
                            systemId.lastIndexOf('/')+1)+flowName+".xhtml";
                        flow.setStartNode(startNodePath);
                    }
                }
            }
            return facesConfig;
            //getDispenser().feed(getUnmarshaller().getFacesConfig(stream, systemId));
View Full Code Here

            {
                // Zero lenght, if that so the flow definition must be implicitly derived.
                // See JSF 2.2 section 11.4.3.3
                //
                FacesConfig facesConfig = new org.apache.myfaces.config.impl.digester.elements.FacesConfig();
                FacesFlowDefinitionImpl flow = new FacesFlowDefinitionImpl();
                String flowName = systemId.substring(systemId.lastIndexOf('/')+1, systemId.lastIndexOf("-flow.xml"));
                flow.setId(flowName);
                // In this case the defining document id is implicit associated
                flow.setDefiningDocumentId(systemId);
               
                String startNodePath = systemId.substring(0, systemId.lastIndexOf('/')+1)+flowName+".xhtml";
                URL startNodeUrl = ectx.getResource(startNodePath);
                if (startNodeUrl != null)
                {
                    flow.setStartNode(startNodePath);
                }
               
                // There is a default return node with name [flow-name]-return and
                // that by default points to an outer /[flow-name]-return outcome
                FacesFlowReturnImpl returnNode = new FacesFlowReturnImpl();
                returnNode.setId(flowName+"-return");
                NavigationCase returnNavCase = new NavigationCase();
                returnNavCase.setFromOutcome("/"+flowName+"-return");
                returnNode.setNavigationCase(returnNavCase);
                flow.addReturn(returnNode);
               
                facesConfig.getFacesFlowDefinitions().add(flow);
                return facesConfig;
            }
View Full Code Here

TOP

Related Classes of org.apache.myfaces.config.impl.digester.elements.FacesFlowDefinitionImpl

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.