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 String getLongDescription() {
    return "Bouquet de Jasmin et d'Euphorbe<br/>Pour une femme passionnée<br/>entrainez dans votre sillage les sphynxs de l'orient ...</br>";
  }

  public HtmlOutputText getHtml() {
    HtmlOutputText result = new HtmlOutputText();
    UIOutput out = new SimpleOutput();
    String id = request.getParameter("id");
    String htmlContent = getHtmlContentInDb(id);
    out.setValue(htmlContent);
    result.setValue(out);
    result.setEscape(true);
    return result;
  }
View Full Code Here

    }

    @NotNull
    public static HtmlOutputText addOutputText(@NotNull
    UIComponent parent, FacesComponentIdFactory idFactory, CharSequence value, String styleClass) {
        HtmlOutputText text = createComponent(HtmlOutputText.class, idFactory);
        text.setValue(value);
        text.setStyleClass(styleClass);
        parent.getChildren().add(text);
        return text;
    }
View Full Code Here

    }

    @NotNull
    public static HtmlOutputText createOutputText(FacesComponentIdFactory idFactory, CharSequence value,
        String styleClass) {
        HtmlOutputText text = createComponent(HtmlOutputText.class, idFactory);
        if (value != null)
            value = value.toString().trim();
        text.setValue(value);
        text.setStyleClass(styleClass);
        return text;
    }
View Full Code Here

    @NotNull
    public static HtmlColumn addColumn(@NotNull
    UIComponent parent, FacesComponentIdFactory idFactory, CharSequence headerText, String headerStyle) {
        HtmlColumn column = createComponent(HtmlColumn.class, idFactory);
        HtmlOutputText header = new HtmlOutputText();
        header.setValue(headerText);
        header.setStyleClass(headerStyle);
        column.setHeader(header);
        parent.getChildren().add(column);
        return column;
    }
View Full Code Here

    }

    @NotNull
    public static HtmlOutputText addVerbatimText(@NotNull
    UIComponent parent, CharSequence html) {
        HtmlOutputText outputText = createComponent(HtmlOutputText.class, null);
        outputText.setEscape(false);
        outputText.setValue(html);
        parent.getChildren().add(outputText);
        return outputText;
    }
View Full Code Here

                = (HtmlCommandLink)application.createComponent(HtmlCommandLink.COMPONENT_TYPE);
        link.setId(component.getId() + "_" + valueForLink.getTime() + "_link");
        link.setTransient(true);
        link.setImmediate(component.isImmediate());

        HtmlOutputText text
                = (HtmlOutputText)application.createComponent(HtmlOutputText.COMPONENT_TYPE);
        text.setValue(content);
        text.setId(component.getId() + "_" + valueForLink.getTime() + "_text");
        text.setTransient(true);

        UIParameter parameter
                = (UIParameter)application.createComponent(UIParameter.COMPONENT_TYPE);
        parameter.setId(component.getId() + "_" + valueForLink.getTime() + "_param");
        parameter.setTransient(true);
View Full Code Here

        renderKit.addRenderer(
                new HtmlForm().getFamily(),
                new HtmlForm().getRendererType(),
                new HtmlFormRenderer());
        renderKit.addRenderer(
                new HtmlOutputText().getFamily(),
                new HtmlOutputText().getRendererType(),
                new HtmlTextRenderer());
        renderKit.addRenderer(
                new HtmlInputText().getFamily(),
                new HtmlInputText().getRendererType(),
                new HtmlTextRenderer());          
View Full Code Here

        vdl.buildView(facesContext, viewRoot);
        stateManagement.suscribeListeners(viewRoot);

        viewRoot.getAttributes().put("somekey", "somevalue");
       
        HtmlOutputText a = new HtmlOutputText();
       
        a.setId("output1");
        a.setValue("testOutput1");
       
        viewRoot.getChildren().add(a);
       
        Object state1 = stateManagement.saveView(facesContext);
        stateToRestore = state1;
        facesContext.setViewRoot(null);
        stateManagement.restoreView(facesContext, "/root", viewRoot.getRenderKitId());
       
        viewRoot = facesContext.getViewRoot();
       
        Assert.assertEquals("somevalue", viewRoot.getAttributes().get("somekey"));
        Assert.assertNotNull(viewRoot.findComponent("form1"));
        Assert.assertNotNull(viewRoot.findComponent("form1:foo1"));
        Assert.assertNotNull(viewRoot.findComponent("form1:var1"));
        Assert.assertNotNull(viewRoot.findComponent("form1:button1"));
       
        a = (HtmlOutputText) viewRoot.findComponent("output1");
        Assert.assertNotNull(a);
        Assert.assertEquals("testOutput1",a.getValue());
    }
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.