Examples of FacesConfig


Examples of org.apache.openejb.jee.FacesConfig

        // load the faces configuration files
        // TODO:kmalhi:: Its good to have separate FacesConfig objects for multiple configuration files, but what if there is a conflict where the same
        // managebean is declared in two different files, which one wins? -- check the jsf spec, Hopefully JSF should be able to check for this and
        // flag an error and not allow the application to be deployed.
        for (final URL location : facesConfigLocations) {
            final FacesConfig facesConfig = ReadDescriptors.readFacesConfig(location);
            webModule.getFacesConfigs().add(facesConfig);
            if ("file".equals(location.getProtocol())) {
                webModule.getWatchedResources().add(URLs.toFilePath(location));
            }
        }
View Full Code Here

Examples of org.apache.openejb.jee.FacesConfig

        }
        return tldTaglib;
    }

    public static FacesConfig readFacesConfig(URL url) throws OpenEJBException {
        FacesConfig facesConfig;
        try {
         facesConfig = (FacesConfig) JaxbJavaee
        .unmarshalJavaee(FacesConfig.class, IO.read(url));
        } catch (SAXException e) {
            throw new OpenEJBException("Cannot parse the faces configuration file: " + url.toExternalForm(), e);
View Full Code Here

Examples of org.apache.openejb.jee.FacesConfig

        // load the faces configuration files
        // TODO:kmalhi:: Its good to have separate FacesConfig objects for multiple configuration files, but what if there is a conflict where the same
        // managebean is declared in two different files, which one wins? -- check the jsf spec, Hopefully JSF should be able to check for this and
        // flag an error and not allow the application to be deployed.
        for (URL location : facesConfigLocations) {
           FacesConfig facesConfig = ReadDescriptors.readFacesConfig(location);
            webModule.getFacesConfigs().add(facesConfig);
            if ("file".equals(location.getProtocol())) {
                webModule.getWatchedResources().add(URLs.toFilePath(location));
            }
        }
View Full Code Here

Examples of org.apache.openejb.jee.FacesConfig

        }
        return tldTaglib;
    }
   
    public static FacesConfig readFacesConfig(URL url) throws OpenEJBException {
        FacesConfig facesConfig;
        try {
         JAXBElement<FacesConfig> element = (JAXBElement<FacesConfig>) JaxbJavaee
        .unmarshal(FacesConfig.class, url.openStream());
         facesConfig = element.getValue();
        } catch (SAXException e) {
View Full Code Here

Examples of org.apache.openejb.jee.FacesConfig

        }
        return tldTaglib;
    }

    public static FacesConfig readFacesConfig(URL url) throws OpenEJBException {
        FacesConfig facesConfig;
        try {
         facesConfig = (FacesConfig) JaxbJavaee
        .unmarshalJavaee(FacesConfig.class, url.openStream());
        } catch (SAXException e) {
            throw new OpenEJBException("Cannot parse the faces configuration file: " + url.toExternalForm(), e);
View Full Code Here

Examples of org.apache.openejb.jee.FacesConfig

        // load the faces configuration files
        // TODO:kmalhi:: Its good to have separate FacesConfig objects for multiple configuration files, but what if there is a conflict where the same
        // managebean is declared in two different files, which one wins? -- check the jsf spec, Hopefully JSF should be able to check for this and
        // flag an error and not allow the application to be deployed.
        for (URL location : facesConfigLocations) {
            FacesConfig facesConfig = ReadDescriptors.readFacesConfig(location);
            webModule.getFacesConfigs().add(facesConfig);
            if ("file".equals(location.getProtocol())) {
                webModule.getWatchedResources().add(URLs.toFilePath(location));
            }
        }
View Full Code Here

Examples of org.apache.openejb.jee.FacesConfig

        List<String> managedBeanClasses = new ArrayList<String>();
        managedBeanClasses.add("org.apache.openejb.faces.EmployeeBean");
        managedBeanClasses.add("org.apache.openejb.faces.OneBean");
        managedBeanClasses.add("org.apache.openejb.faces.TwoBean");
        InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream("jsf/faces-config.xml");
        FacesConfig facesConfig = (FacesConfig) JaxbJavaee.unmarshalJavaee(FacesConfig.class, inputStream);
        List<FacesManagedBean> managedBean = facesConfig.getManagedBean();

        for (FacesManagedBean bean : managedBean) {
            assertTrue(managedBeanClasses.contains(bean.getManagedBeanClass().trim()));
        }
        assertEquals(3, managedBean.size());
View Full Code Here

Examples of org.apache.openejb.jee.FacesConfig

    public void test11() throws Exception {
        marshalAndUnmarshal(FacesConfig.class, "jsf/1_1_dtd/faces-config-simple-src.xml", "jsf/1_0_dtd/faces-config-simple-expected.xml");
        marshalAndUnmarshal(FacesConfig.class, "jsf/1_1_dtd/faces-config-moderate-src.xml", "jsf/1_0_dtd/faces-config-moderate-expected.xml");
        marshalAndUnmarshal(FacesConfig.class, "jsf/1_1_dtd/faces-config-complex-src.xml", "jsf/1_0_dtd/faces-config-complex-expected.xml");
        marshalAndUnmarshal(FacesConfig.class, "jsf/1_1_dtd/faces-config-empty-src.xml", "jsf/1_0_dtd/faces-config-empty-expected.xml");
        FacesConfig f = marshalAndUnmarshal(FacesConfig.class, "jsf/1_1_dtd/faces-config.xml", null);
    }
View Full Code Here

Examples of org.apache.openejb.jee.FacesConfig

        // load the faces configuration files
        // TODO:kmalhi:: Its good to have separate FacesConfig objects for multiple configuration files, but what if there is a conflict where the same
        // managebean is declared in two different files, which one wins? -- check the jsf spec, Hopefully JSF should be able to check for this and
        // flag an error and not allow the application to be deployed.
        for (URL location : facesConfigLocations) {
           FacesConfig facesConfig = ReadDescriptors.readFacesConfig(location);
            webModule.getFacesConfigs().add(facesConfig);
            if ("file".equals(location.getProtocol())) {
                webModule.getWatchedResources().add(URLs.toFilePath(location));
            }
        }
View Full Code Here

Examples of org.apache.openejb.jee.FacesConfig

        }
        return tldTaglib;
    }
   
    public static FacesConfig readFacesConfig(URL url) throws OpenEJBException {
        FacesConfig facesConfig;
        try {
         JAXBElement<FacesConfig> element = (JAXBElement<FacesConfig>) JaxbJavaee
        .unmarshal(FacesConfig.class, url.openStream());
         facesConfig = element.getValue();
        } catch (SAXException e) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.