Package javax.faces.component.html

Examples of javax.faces.component.html.HtmlOutputText


        facesContext.getRenderKit().addRenderer(
                dataTable.getFamily(),
                dataTable.getRendererType(),
                new HtmlTableRenderer());

        HtmlOutputText text = new HtmlOutputText();
        facesContext.getRenderKit().addRenderer(
                text.getFamily(),
                text.getRendererType(),
                new HtmlTextRenderer());

        facesContext.getAttributes().put("org.apache.myfaces.RENDERED_JSF_JS", Boolean.TRUE);
    }
View Full Code Here


        dataTable.setId("data");
        dataTable.setRowClasses("class1, class2");
        dataTable.setVar("person");
       
        UIColumn column1 = new UIColumn();
        HtmlOutputText text = new HtmlOutputText();
        text.setValueExpression("value",
                facesContext.getApplication().getExpressionFactory().createValueExpression(
                        facesContext.getELContext(), "#{person.firstName}", String.class));
        column1.getChildren().add(text);
       
        dataTable.getChildren().add(column1);
        UIColumn column2 = new UIColumn();
        HtmlOutputText text2 = new HtmlOutputText();
        text2.setValueExpression("value",
                facesContext.getApplication().getExpressionFactory().createValueExpression(
                        facesContext.getELContext(), "#{person.lastName}", String.class));
        column2.getChildren().add(text2);
        dataTable.getChildren().add(column2);
View Full Code Here

    public void setUp() throws Exception
    {
        super.setUp();

        panelGrid = new HtmlPanelGrid();
        colText = new HtmlOutputText();

        writer = new MockResponseWriter(new StringWriter(), null, null);
        facesContext.setResponseWriter(writer);

        facesContext.getViewRoot().setRenderKitId(MockRenderKitFactory.HTML_BASIC_RENDER_KIT);
View Full Code Here

    }

    public void testRenderTable() throws Exception
    {
        UIColumn col1 = new UIColumn();
        HtmlOutputText col1Text = new HtmlOutputText();
        col1Text.setValue("col1Text");

        UIColumn col2 = new UIColumn();
        HtmlOutputText col2Text = new HtmlOutputText();
        col2Text.setValue("col2Text");

        col1.getChildren().add(col1Text);
        col2.getChildren().add(col2Text);
        panelGrid.getChildren().add(col1);
        panelGrid.getChildren().add(col2);
View Full Code Here

    public void setUp() throws Exception
    {
        super.setUp();

        outputText = new HtmlOutputText();
        inputText = new HtmlInputText();

        writer = new MockResponseWriter(new StringWriter(), null, null);
        facesContext.setResponseWriter(writer);
        // TODO remove these two lines once myfaces-test goes alpha, see MYFACES-1155
View Full Code Here

    @Override
    protected void setUpRenderKit() throws Exception {
        super.setUpRenderKit();
        renderKit.addRenderer(HtmlDataTable.COMPONENT_FAMILY, new HtmlDataTable().getRendererType(), new Renderer(){});
        renderKit.addRenderer(HtmlOutputText.COMPONENT_FAMILY, new HtmlOutputText().getRendererType(), new Renderer(){});
        renderKit.addRenderer(HtmlInputText.COMPONENT_FAMILY, new HtmlInputText().getRendererType(), new Renderer(){});
    }
View Full Code Here

        data.setRows(rowCount);
       
        UIColumn col = new HtmlColumn();
        data.getChildren().add(col);

        UIOutput text = new HtmlOutputText();
        text.setId("text");
        text.setValue(facesContext.getApplication().
                getExpressionFactory().createValueExpression(
                facesContext.getELContext(), "#{item.name}", String.class));
        col.getChildren().add(text);
       
        for (int i = 0; i < rowCount ; i++)
        {
            data.setRowIndex(i);
            Assert.assertEquals(data.getId()+":"+i+":"+text.getId(), text.getClientId());
        }
        data.setRowIndex(-1);
        Assert.assertEquals(data.getId()+":"+text.getId(), text.getClientId());
    }
View Full Code Here

        data.setRows(rowCount);
       
        UIColumn col = new HtmlColumn();
        data.getChildren().add(col);

        UIOutput text = new HtmlOutputText();
        text.setId("text");
        text.setValue(facesContext.getApplication().
                getExpressionFactory().createValueExpression(
                facesContext.getELContext(), "#{item.name}", String.class));
        col.getChildren().add(text);
       
        UIInput inputText = new HtmlInputText();
        inputText.setId("text");
        inputText.setValue(facesContext.getApplication().
                getExpressionFactory().createValueExpression(
                facesContext.getELContext(), "#{item.lastName}", String.class));
        col.getChildren().add(inputText);

        for (int i = 0; i < rowCount ; i++)
        {
            data.setRowIndex(i);
            Assert.assertEquals(data.getId()+":"+i+":"+text.getId(), text.getClientId());
            Assert.assertEquals(data.getId()+":"+i+":"+inputText.getId(), inputText.getClientId());
        }
        data.setRowIndex(-1);
        Assert.assertEquals(data.getId()+":"+text.getId(), text.getClientId());
        Assert.assertEquals(data.getId()+":"+inputText.getId(), inputText.getClientId());
    }
View Full Code Here

        data.setRows(rowCount);
       
        UIColumn col = new HtmlColumn();
        data.getChildren().add(col);

        UIOutput text = new HtmlOutputText();
        text.setId("text");
        text.setValue(facesContext.getApplication().
                getExpressionFactory().createValueExpression(
                facesContext.getELContext(), "#{item.name}", String.class));
        col.getChildren().add(text);
       
        data.setRowIndex(-1);
View Full Code Here

        data.setRows(rowCount);
       
        UIColumn col = new HtmlColumn();
        data.getChildren().add(col);

        UIOutput text = new HtmlOutputText();
        text.setId("text");
        text.setValue(facesContext.getApplication().
                getExpressionFactory().createValueExpression(
                facesContext.getELContext(), "#{item.name}", String.class));
        col.getChildren().add(text);
       
        UIInput inputText = new HtmlInputText();
View Full Code Here

TOP

Related Classes of javax.faces.component.html.HtmlOutputText

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.