Package com.sun.facelets

Examples of com.sun.facelets.FaceletFactory


    }
   
    public void testValidateLengthHandler() throws Exception {
        FacesContext faces = FacesContext.getCurrentInstance();

        FaceletFactory f = FaceletFactory.getInstance();
        Facelet at = f.getFacelet("validateLength.xml");

        UIViewRoot root = faces.getViewRoot();
        at.apply(faces, root);
       
        UIInput input = (UIInput) root.findComponent("form:input");
View Full Code Here


    }
   
    public void testValidateLongRangeHandler() throws Exception {
        FacesContext faces = FacesContext.getCurrentInstance();

        FaceletFactory f = FaceletFactory.getInstance();
        Facelet at = f.getFacelet("validateLongRange.xml");

        UIViewRoot root = faces.getViewRoot();
        at.apply(faces, root);
       
        UIInput input = (UIInput) root.findComponent("form:input");
View Full Code Here

    }
   
    public void testValueChangeListenerHandler() throws Exception {
        FacesContext faces = FacesContext.getCurrentInstance();

        FaceletFactory f = FaceletFactory.getInstance();
        Facelet at = f.getFacelet("valueChangeListener.xml");

        UIViewRoot root = faces.getViewRoot();
        at.apply(faces, root);
       
        UIInput input = (UIInput) root.findComponent("form:input");
View Full Code Here

   
    public void testViewHandler() throws Exception {
       
        FacesContext faces = FacesContext.getCurrentInstance();

        FaceletFactory f = FaceletFactory.getInstance();
        Facelet at = f.getFacelet("view.xml");

        UIViewRoot root = faces.getViewRoot();
        at.apply(faces, root);
       
        assertEquals("german locale", Locale.GERMAN, root.getLocale());
View Full Code Here

            }
        };
    }

    protected void buildView(String viewId) throws IOException {
        FaceletFactory factory = new DefaultFaceletFactory(compiler, createResourceResolver());

        FaceletFactory.setInstance(factory);

        FaceletFactory f = FaceletFactory.getInstance();
        Facelet at = f.getFacelet(viewId);
        UIViewRoot root = facesContext.getViewRoot();

        root.setViewId(viewId);
        at.apply(facesContext, root);
    }
View Full Code Here

TOP

Related Classes of com.sun.facelets.FaceletFactory

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.