Package com.sun.facelets

Examples of com.sun.facelets.FaceletFactory


import com.sun.facelets.util.FastWriter;

public class TestUserTags extends FaceletTestCase {

    public void testClientClient() throws Exception {
        FaceletFactory ff = FaceletFactory.getInstance();
        FacesContext faces = FacesContext.getCurrentInstance();
       
        Facelet f = ff.getFacelet("test-tags.xml");
       
        this.servletRequest.setAttribute("test", "foo");
       
        UIViewRoot root = faces.getViewRoot();
        f.apply(faces, 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.