Package com.sun.facelets

Examples of com.sun.facelets.FaceletFactory


            }
        };
    }

    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


        ActionListener listener = new ActionListenerImpl();
        FacesContext faces = FacesContext.getCurrentInstance();
        faces.getExternalContext().getRequestMap().put("actionListener",
                listener);

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

        UIViewRoot root = faces.getViewRoot();
        at.apply(faces, root);

        UICommand action1 = (UICommand) root.findComponent("action1");
View Full Code Here

    public void testAttributeHandler() throws Exception {
        String title = "Dog in a Funny Hat";
        FacesContext faces = FacesContext.getCurrentInstance();
        faces.getExternalContext().getRequestMap().put("title", title);

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

        UIViewRoot root = faces.getViewRoot();
        at.apply(faces, root);

        HtmlGraphicImage graphic1 = (HtmlGraphicImage) root
View Full Code Here

    public void testConvertDateTimeHandler() throws Exception {
        Date now = new Date(1000 * 360 * 60 * 24 * 7);
        FacesContext faces = FacesContext.getCurrentInstance();
        faces.getExternalContext().getRequestMap().put("now", now);

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

        UIViewRoot root = faces.getViewRoot();
        at.apply(faces, root);

        UIOutput out1 = (UIOutput) root.findComponent("form:out1");
View Full Code Here

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

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

        UIViewRoot root = faces.getViewRoot();
        at.apply(faces, root);
       
        UIOutput out1 = (UIOutput) root.findComponent("out1");
View Full Code Here

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

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

        UIViewRoot root = faces.getViewRoot();
        at.apply(faces, root);
       
        UIOutput out1 = (UIOutput) root.findComponent("out1");
View Full Code Here

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

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

        UIViewRoot root = faces.getViewRoot();
        at.apply(faces, root);
       
        UIData data = (UIData) root.findComponent("table");
View Full Code Here

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

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

        UIViewRoot root = faces.getViewRoot();
        at.apply(faces, root);
       
        Object value = faces.getExternalContext().getRequestMap().get("foo");
View Full Code Here

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

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

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

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

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

        UIViewRoot root = faces.getViewRoot();
        at.apply(faces, root);
       
        UIInput input = (UIInput) root.findComponent("form:input");
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.