Package javax.faces.component.html

Examples of javax.faces.component.html.HtmlOutputText


{
  if (!(component instanceof HtmlOutputText))
  {
    throw new IllegalArgumentException("Component " + component.getClass().getName() + " is no HtmlOutputText");
  }
  HtmlOutputText comp = (HtmlOutputText)component;

  super.setProperties(component);

  if (_title != null)
  {
    comp.setValueExpression("title", _title);
  }
  if (_style != null)
  {
    comp.setValueExpression("style", _style);
  }
  if (_escape != null)
  {
    comp.setValueExpression("escape", _escape);
  }
  if (_dir != null)
  {
    comp.setValueExpression("dir", _dir);
  }
  if (_converter != null)
  {
    if (!_converter.isLiteralText())
    {
      comp.setValueExpression("converter", _converter);
    }
    else
    {
      String s = _converter.getExpressionString();
      if (s != null)
      {
        Converter converter = getFacesContext().getApplication().
          createConverter(s);
        comp.setConverter(converter);
      }
    }
  }
  if (_value != null)
  {
    comp.setValueExpression("value", _value);
  }
  if (_styleClass != null)
  {
    comp.setValueExpression("styleClass", _styleClass);
  }
  if (_lang != null)
  {
    comp.setValueExpression("lang", _lang);
  }
}
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

    {
        super.setUp();

        panelGroup = new HtmlPanelGroup();

        HtmlOutputText panelChildOutputText = new HtmlOutputText();
        panelChildOutputText.setValue(PANEL_CHILD_TEXT);
        panelGroup.getChildren().add(panelChildOutputText);

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

        facesContext.getViewRoot().setRenderKitId(MockRenderKitFactory.HTML_BASIC_RENDER_KIT);
        facesContext.getRenderKit().addRenderer(
                panelGroup.getFamily(),
                panelGroup.getRendererType(),
                new HtmlGroupRenderer());
        facesContext.getRenderKit().addRenderer(
                panelChildOutputText.getFamily(),
                panelChildOutputText.getRendererType(),
                new HtmlTextRenderer());
       
        facesContext.getAttributes().put("org.apache.myfaces.RENDERED_JSF_JS", Boolean.TRUE);
    }
View Full Code Here

                final String logoUrl = "background: transparent url('" + uibdh.getApplicationLogoURL() + "') no-repeat scroll 0% 0%;";
                desktopTitlebar.setStyle(logoUrl);
            }

            if (uibdh.getApplicationTitle() != null) {
                final HtmlOutputText applicationTitle = new HtmlOutputText();
                applicationTitle.setValue(uibdh.getApplicationTitle());
                applicationTitle.setStyleClass(APPLICATIONTITLE_CLASS);
                desktopTitlebar.getChildren().add(applicationTitle);
            }

            if (uibdh.getApplicationTagline() != null) {
                final HtmlOutputText applicationTagline = new HtmlOutputText();
                applicationTagline.setValue(uibdh.getApplicationTagline());
                applicationTagline.setStyleClass(TAGLINE_CLASS);
                desktopTitlebar.getChildren().add(applicationTagline);
            }

            desktopTitlebarWrapper.getChildren().add(desktopTitlebar);
            uibdh.getChildren().add(desktopTitlebarWrapper);
View Full Code Here

{
  if (!(component instanceof HtmlOutputText))
  {
    throw new IllegalArgumentException("Component " + component.getClass().getName() + " is no HtmlOutputText");
  }
  HtmlOutputText comp = (HtmlOutputText)component;

  super.setProperties(component);

  if (_value != null)
  {
    comp.setValueExpression("value", _value);
  }
  if (_escape != null)
  {
    comp.setValueExpression("escape", _escape);
  }
  if (_styleClass != null)
  {
    comp.setValueExpression("styleClass", _styleClass);
  }
  if (_dir != null)
  {
    comp.setValueExpression("dir", _dir);
  }
  if (_lang != null)
  {
    comp.setValueExpression("lang", _lang);
  }
  if (_title != null)
  {
    comp.setValueExpression("title", _title);
  }
  if (_style != null)
  {
    comp.setValueExpression("style", _style);
  }
  if (_converter != null)
  {
    if (!_converter.isLiteralText())
    {
      comp.setValueExpression("converter", _converter);
    }
    else
    {
      String s = _converter.getExpressionString();
      if (s != null)
      {
        Converter converter = getFacesContext().getApplication().
          createConverter(s);
        comp.setConverter(converter);
      }
    }
  }
}
View Full Code Here

            throws IOException
    {
        Converter converter = getConverter(component);
        Application application = facesContext.getApplication();

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

        HtmlInputCalendar calendar = (HtmlInputCalendar)component;
        if (isDisabled(facesContext, component) || calendar.isReadonly())
        {
            component.getChildren().add(text);
View Full Code Here

            throws IOException
    {
        Converter converter = getConverter(component);
        Application application = facesContext.getApplication();

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

        HtmlInputCalendar calendar = (HtmlInputCalendar)component;
        if (isDisabled(facesContext, component) || calendar.isReadonly())
        {
            component.getChildren().add(text);
View Full Code Here

            parameter.setValue(id);
            List children = link.getChildren();
            children.add(parameter);
            if (text != null)
            {
                HtmlOutputText uiText = (HtmlOutputText) application
                                .createComponent(HtmlOutputText.COMPONENT_TYPE);
                uiText.setId(scroller.getId() + id + "_text");
                uiText.setTransient(true);
                uiText.setValue(text);
                children.add(uiText);
            }
            scroller.getChildren().add(link);
        }
        else
        {
            UIOutput uiText = (UIOutput) link.findComponent(scroller.getId() + id + "_text");
            if (uiText != null)
            {
                //Update text value
                uiText.setValue(text);
            }
        }
        return link;
    }
View Full Code Here

            throws IOException
    {
        Converter converter = getConverter(component);
        Application application = facesContext.getApplication();

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

        HtmlInputCalendar calendar = (HtmlInputCalendar)component;
        if (isDisabled(facesContext, component) || calendar.isReadonly())
        {
            component.getChildren().add(text);
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.