Examples of HtmlRenderedAttr


Examples of org.apache.myfaces.test.utils.HtmlRenderedAttr

    
    public void testHtmlPropertyPassTru() throws Exception
    {
        HtmlRenderedAttr[] attrs = {
            //_AccesskeyProperty
            new HtmlRenderedAttr("accesskey"),
            //_UniversalProperties
            new HtmlRenderedAttr("dir"),
            new HtmlRenderedAttr("lang"),
            new HtmlRenderedAttr("title"),
            //_FocusBlurProperties
            new HtmlRenderedAttr("onfocus"),
            new HtmlRenderedAttr("onblur"),
            //_EventProperties
            //new HtmlRenderedAttr("onclick",1) "onclick",
            //        "onclick=\"var cf = function(){onclick};var oamSF = function(){return oamSubmitForm('j_id1','j_id1:j_id0');};return (cf()==false)? false : oamSF();\"")
            //,
            new HtmlRenderedAttr("ondblclick"),
            new HtmlRenderedAttr("onkeydown"),
            new HtmlRenderedAttr("onkeypress"),
            new HtmlRenderedAttr("onkeyup"),
            new HtmlRenderedAttr("onmousedown"),
            new HtmlRenderedAttr("onmousemove"),
            new HtmlRenderedAttr("onmouseout"),
            new HtmlRenderedAttr("onmouseover"),
            new HtmlRenderedAttr("onmouseup"),
            //_StyleProperties
            new HtmlRenderedAttr("style"),
            new HtmlRenderedAttr("styleClass", "styleClass", "class=\"styleClass\""),
            //_TabindexProperty
            new HtmlRenderedAttr("tabindex")
        };
       
        commandLink.setValue("outputdata");
       
        HtmlCheckAttributesUtil.checkRenderedAttributes(
View Full Code Here

Examples of org.apache.myfaces.test.utils.HtmlRenderedAttr

   
    public void testOutputLink() throws Exception
    {
        HtmlRenderedAttr[] attrs = {
            //_AccesskeyProperty
            new HtmlRenderedAttr("accesskey"),
            //_UniversalProperties
            new HtmlRenderedAttr("dir"),
            new HtmlRenderedAttr("lang"),
            new HtmlRenderedAttr("title"),
            //_FocusBlurProperties
            new HtmlRenderedAttr("onfocus"),
            new HtmlRenderedAttr("onblur"),
            //_EventProperties
            new HtmlRenderedAttr("onclick"),
            new HtmlRenderedAttr("ondblclick"),
            new HtmlRenderedAttr("onkeydown"),
            new HtmlRenderedAttr("onkeyup"),
            new HtmlRenderedAttr("onmousedown"),
            new HtmlRenderedAttr("onmousemove"),
            new HtmlRenderedAttr("onmouseout"),
            new HtmlRenderedAttr("onmouseover"),
            new HtmlRenderedAttr("onmouseup"),
            //_StyleProperties
            new HtmlRenderedAttr("style"),
            new HtmlRenderedAttr("styleClass", "styleClass", "class=\"styleClass\""),
            //_TabindexProperty
            new HtmlRenderedAttr("tabindex")
        };

       
        HtmlCheckAttributesUtil.checkRenderedAttributes(
                outputLink, facesContext, writer, attrs);
View Full Code Here

Examples of org.apache.myfaces.test.utils.HtmlRenderedAttr

    public void testSelectManyHtmlPropertyPassTru() throws Exception
    {
        HtmlRenderedAttr[] attrs = {
            //_AccesskeyProperty
            new HtmlRenderedAttr("accesskey"),
            //_UniversalProperties
            new HtmlRenderedAttr("dir"),
            new HtmlRenderedAttr("lang"),
            new HtmlRenderedAttr("title"),
            new HtmlRenderedAttr("role"),
            //_FocusBlurProperties
            new HtmlRenderedAttr("onfocus"),
            new HtmlRenderedAttr("onblur"),
            //_ChangeSelectProperties
            new HtmlRenderedAttr("onchange"),
            new HtmlRenderedAttr("onselect"),
            //_EventProperties
            new HtmlRenderedAttr("onclick"),
            new HtmlRenderedAttr("ondblclick"),
            new HtmlRenderedAttr("onkeydown"),
            new HtmlRenderedAttr("onkeypress"),
            new HtmlRenderedAttr("onkeyup"),
            new HtmlRenderedAttr("onmousedown"),
            new HtmlRenderedAttr("onmousemove"),
            new HtmlRenderedAttr("onmouseout"),
            new HtmlRenderedAttr("onmouseover"),
            new HtmlRenderedAttr("onmouseup"),
            //_StyleProperties
            new HtmlRenderedAttr("style", 1),
            new HtmlRenderedAttr("styleClass", "styleClass", "class=\"styleClass\"", 1),
            //_TabindexProperty
            new HtmlRenderedAttr("tabindex")
        };
       
        UISelectItem item = new UISelectItem();
        item.setItemLabel("mars");
        item.setItemValue("mars");
View Full Code Here

Examples of org.apache.myfaces.test.utils.HtmlRenderedAttr

   
    public void testHtmlPropertyPassTru() throws Exception
    {
        HtmlRenderedAttr[] attrs = {
            //_AccesskeyProperty
            new HtmlRenderedAttr("accesskey"),
            //_UniversalProperties
            new HtmlRenderedAttr("dir"),
            new HtmlRenderedAttr("lang"),
            new HtmlRenderedAttr("title"),
            new HtmlRenderedAttr("role"),
            //_FocusBlurProperties
            new HtmlRenderedAttr("onfocus"),
            new HtmlRenderedAttr("onblur"),
            //_ChangeSelectProperties
            new HtmlRenderedAttr("onchange"),
            new HtmlRenderedAttr("onselect"),
            //_EventProperties
            new HtmlRenderedAttr("onclick"),
            new HtmlRenderedAttr("ondblclick"),
            new HtmlRenderedAttr("onkeydown"),
            new HtmlRenderedAttr("onkeypress"),
            new HtmlRenderedAttr("onkeyup"),
            new HtmlRenderedAttr("onmousedown"),
            new HtmlRenderedAttr("onmousemove"),
            new HtmlRenderedAttr("onmouseout"),
            new HtmlRenderedAttr("onmouseover"),
            new HtmlRenderedAttr("onmouseup"),
            //_StyleProperties
            new HtmlRenderedAttr("style", 1),
            new HtmlRenderedAttr("styleClass", "styleClass", "class=\"styleClass\"", 1),

            //_TabindexProperty
            new HtmlRenderedAttr("tabindex")
        };
       
        List<SelectItem> items = new ArrayList<SelectItem>();
        items.add(new SelectItem("mars"));
View Full Code Here

Examples of org.apache.myfaces.test.utils.HtmlRenderedAttr

       
        ResponseWriter mrw = new HtmlResponseWriterImpl(sw, "text/html", "UTF-8");
        facesContext.setResponseWriter(mrw);
       
        HtmlRenderedAttr[] attrs = {
            new HtmlRenderedAttr("data_up", "Going Up"),
            new HtmlRenderedAttr("placeholder", "Enter text"),
            new HtmlRenderedAttr("onclick", "alert('hello')"),
            //new HtmlRenderedAttr("customAttr", "SomeValue"),
            new HtmlRenderedAttr("value", "value1")
        };
       
        input1.encodeAll(facesContext);
       
        sw.flush();
       
        HtmlCheckAttributesUtil.checkRenderedAttributes(attrs, sw.toString());
        if(HtmlCheckAttributesUtil.hasFailedAttrRender(attrs))
        {
            Assert.fail(HtmlCheckAttributesUtil.constructErrorMessage(attrs, sw.toString()));
        }
       
        sw = new StringWriter();
        mrw = new HtmlResponseWriterImpl(sw, "text/html", "UTF-8");
        facesContext.setResponseWriter(mrw);
       
        input2.encodeAll(facesContext);
       
        sw.flush();
       
        attrs = new HtmlRenderedAttr[]{
            new HtmlRenderedAttr("data_up", "Going Up"),
            new HtmlRenderedAttr("onclick", "alert('hello')"),
            //new HtmlRenderedAttr("customAttr", "SomeValue"),
            new HtmlRenderedAttr("placeholder", "Enter text")
        };       
       
        HtmlCheckAttributesUtil.checkRenderedAttributes(attrs, sw.toString());
        if(HtmlCheckAttributesUtil.hasFailedAttrRender(attrs))
        {
            Assert.fail(HtmlCheckAttributesUtil.constructErrorMessage(attrs, sw.toString()));
        }
        Assert.assertTrue(sw.toString().contains("<meter "));
        Assert.assertTrue(sw.toString().contains("</meter>"));

        sw = new StringWriter();
        mrw = new HtmlResponseWriterImpl(sw, "text/html", "UTF-8");
        facesContext.setResponseWriter(mrw);
       
        input3.encodeAll(facesContext);
       
        sw.flush();
       
        attrs = new HtmlRenderedAttr[]{
            new HtmlRenderedAttr("data_up", "Going Up"),
            //new HtmlRenderedAttr("placeholder", "Enter text"),
            //new HtmlRenderedAttr("customAttr", "SomeValue"),
            //new HtmlRenderedAttr("value", "value1"),
            new HtmlRenderedAttr("onclick", "alert('hello')"),
        };
       
        HtmlCheckAttributesUtil.checkRenderedAttributes(attrs, sw.toString());
        if(HtmlCheckAttributesUtil.hasFailedAttrRender(attrs))
        {
            Assert.fail(HtmlCheckAttributesUtil.constructErrorMessage(attrs, sw.toString()));
        }
        Assert.assertTrue(sw.toString().contains("<meter "));
        Assert.assertTrue(sw.toString().contains("</meter>"));

        // TEST 4
        sw = new StringWriter();
        mrw = new HtmlResponseWriterImpl(sw, "text/html", "UTF-8");
        facesContext.setResponseWriter(mrw);
       
        boxDiv4.encodeAll(facesContext);
       
        sw.flush();
       
        attrs = new HtmlRenderedAttr[]{
            new HtmlRenderedAttr("class", "noprint"),
        };
       
        HtmlCheckAttributesUtil.checkRenderedAttributes(attrs, sw.toString());
        if(HtmlCheckAttributesUtil.hasFailedAttrRender(attrs))
        {
            Assert.fail(HtmlCheckAttributesUtil.constructErrorMessage(attrs, sw.toString()));
        }
        Assert.assertTrue(sw.toString().contains("MYBOX4"));
        Assert.assertTrue(sw.toString().contains("<div "));
        Assert.assertTrue(sw.toString().contains("</div>"));
       
        // TEST 5
        sw = new StringWriter();
        mrw = new HtmlResponseWriterImpl(sw, "text/html", "UTF-8");
        facesContext.setResponseWriter(mrw);
       
        boxDiv5.encodeAll(facesContext);
       
        sw.flush();
       
        attrs = new HtmlRenderedAttr[]{
            new HtmlRenderedAttr("style", "noprint"),
        };
       
        HtmlCheckAttributesUtil.checkRenderedAttributes(attrs, sw.toString());
        if(HtmlCheckAttributesUtil.hasFailedAttrRender(attrs))
        {
View Full Code Here

Examples of org.apache.myfaces.test.utils.HtmlRenderedAttr

        box6.encodeAll(facesContext);
       
        sw.flush();       
        HtmlRenderedAttr[] attrs = new HtmlRenderedAttr[]{
            new HtmlRenderedAttr("onclick",
                    "jsf.util.chain(document.getElementById('myForm:box6'), event,'alert(\\'hello\\')', "
                    + "'jsf.ajax.request(\\'myForm:box6\\',event,{render:\\'myForm:box5 \\',"
                            + "\\'javax.faces.behavior.event\\':\\'click\\'})');"),
        };
       
View Full Code Here

Examples of org.apache.myfaces.test.utils.HtmlRenderedAttr

        boxDiv7.encodeAll(facesContext);
       
        sw.flush();       
        HtmlRenderedAttr[] attrs = new HtmlRenderedAttr[]{
            new HtmlRenderedAttr("alt", "Some Logo"),
        };
       
        HtmlCheckAttributesUtil.checkRenderedAttributes(attrs, sw.toString());
        if(HtmlCheckAttributesUtil.hasFailedAttrRender(attrs))
        {
View Full Code Here

Examples of org.apache.myfaces.test.utils.HtmlRenderedAttr

    
    public void testHtmlPropertyPassTru() throws Exception
    {
        HtmlRenderedAttr[] attrs = {
            //_AccesskeyProperty
            new HtmlRenderedAttr("accesskey"),
            //_UniversalProperties
            new HtmlRenderedAttr("dir"),
            new HtmlRenderedAttr("lang"),
            new HtmlRenderedAttr("title"),
            //_FocusBlurProperties
            new HtmlRenderedAttr("onfocus"),
            new HtmlRenderedAttr("onblur"),
            //_EventProperties
            //new HtmlRenderedAttr("onclick",1) "onclick",
            //        "onclick=\"var cf = function(){onclick};var oamSF = function(){return oamSubmitForm(&apos;j_id1&apos;,&apos;j_id1:j_id0&apos;);};return (cf()==false)? false : oamSF();\"")
            //,
            new HtmlRenderedAttr("ondblclick"),
            new HtmlRenderedAttr("onkeydown"),
            new HtmlRenderedAttr("onkeypress"),
            new HtmlRenderedAttr("onkeyup"),
            new HtmlRenderedAttr("onmousedown"),
            new HtmlRenderedAttr("onmousemove"),
            new HtmlRenderedAttr("onmouseout"),
            new HtmlRenderedAttr("onmouseover"),
            new HtmlRenderedAttr("onmouseup"),
            //_StyleProperties
            new HtmlRenderedAttr("style"),
            new HtmlRenderedAttr("styleClass", "styleClass", "class=\"styleClass\""),
            //_TabindexProperty
            new HtmlRenderedAttr("tabindex")
        };
       
        commandLink.setValue("outputdata");
       
        HtmlCheckAttributesUtil.checkRenderedAttributes(
View Full Code Here

Examples of org.apache.myfaces.test.utils.HtmlRenderedAttr

   
    public void testOutputLink() throws Exception
    {
        HtmlRenderedAttr[] attrs = {
            //_AccesskeyProperty
            new HtmlRenderedAttr("accesskey"),
            //_UniversalProperties
            new HtmlRenderedAttr("dir"),
            new HtmlRenderedAttr("lang"),
            new HtmlRenderedAttr("title"),
            //_FocusBlurProperties
            new HtmlRenderedAttr("onfocus"),
            new HtmlRenderedAttr("onblur"),
            //_EventProperties
            new HtmlRenderedAttr("onclick"),
            new HtmlRenderedAttr("ondblclick"),
            new HtmlRenderedAttr("onkeydown"),
            new HtmlRenderedAttr("onkeyup"),
            new HtmlRenderedAttr("onmousedown"),
            new HtmlRenderedAttr("onmousemove"),
            new HtmlRenderedAttr("onmouseout"),
            new HtmlRenderedAttr("onmouseover"),
            new HtmlRenderedAttr("onmouseup"),
            //_StyleProperties
            new HtmlRenderedAttr("style"),
            new HtmlRenderedAttr("styleClass", "styleClass", "class=\"styleClass\""),
            //_TabindexProperty
            new HtmlRenderedAttr("tabindex")
        };

       
        HtmlCheckAttributesUtil.checkRenderedAttributes(
                outputLink, facesContext, writer, attrs);
View Full Code Here

Examples of org.apache.myfaces.test.utils.HtmlRenderedAttr

    public void testSelectManyHtmlPropertyPassTru() throws Exception
    {
        HtmlRenderedAttr[] attrs = {
            //_AccesskeyProperty
            new HtmlRenderedAttr("accesskey"),
            //_UniversalProperties
            new HtmlRenderedAttr("dir"),
            new HtmlRenderedAttr("lang"),
            new HtmlRenderedAttr("title"),
            new HtmlRenderedAttr("role"),
            //_FocusBlurProperties
            new HtmlRenderedAttr("onfocus"),
            new HtmlRenderedAttr("onblur"),
            //_ChangeSelectProperties
            new HtmlRenderedAttr("onchange"),
            new HtmlRenderedAttr("onselect"),
            //_EventProperties
            new HtmlRenderedAttr("onclick"),
            new HtmlRenderedAttr("ondblclick"),
            new HtmlRenderedAttr("onkeydown"),
            new HtmlRenderedAttr("onkeypress"),
            new HtmlRenderedAttr("onkeyup"),
            new HtmlRenderedAttr("onmousedown"),
            new HtmlRenderedAttr("onmousemove"),
            new HtmlRenderedAttr("onmouseout"),
            new HtmlRenderedAttr("onmouseover"),
            new HtmlRenderedAttr("onmouseup"),
            //_StyleProperties
            new HtmlRenderedAttr("style", 1),
            new HtmlRenderedAttr("styleClass", "styleClass", "class=\"styleClass\"", 1),
            //_TabindexProperty
            new HtmlRenderedAttr("tabindex")
        };
       
        UISelectItem item = new UISelectItem();
        item.setItemLabel("mars");
        item.setItemValue("mars");
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.