Examples of HtmlOutputText


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

Examples of javax.faces.component.html.HtmlOutputText

    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

Examples of javax.faces.component.html.HtmlOutputText

    }

    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

Examples of javax.faces.component.html.HtmlOutputText

    {
        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

Examples of javax.faces.component.html.HtmlOutputText

                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

Examples of org.metawidget.statically.faces.component.html.widgetbuilder.HtmlOutputText

         {
            // Render read-only booleans as graphics

            if (boolean.class.equals(clazz))
            {
               HtmlOutputText outputText = new HtmlOutputText();
               StandardBindingProcessor bindingProcessor = metawidget
                        .getWidgetProcessor(StandardBindingProcessor.class);

               if (bindingProcessor != null)
               {
                  bindingProcessor.processWidget(outputText, elementName, attributes, (StaticUIMetawidget) metawidget);
               }

               String styleClassEl = StaticFacesUtils.unwrapExpression(outputText.getValue())
                        + " ? 'boolean-true' : 'boolean-false'";
               outputText.putAttribute("styleClass", StaticFacesUtils.wrapExpression(styleClassEl));
               outputText.setValue("");

               return outputText;
            }
         }
      }
View Full Code Here

Examples of org.metawidget.statically.faces.component.html.widgetbuilder.HtmlOutputText

         {
            // Render read-only booleans as graphics

            if (boolean.class.equals(clazz))
            {
               HtmlOutputText outputText = new HtmlOutputText();
               StandardBindingProcessor bindingProcessor = metawidget
                        .getWidgetProcessor(StandardBindingProcessor.class);

               if (bindingProcessor != null)
               {
                  bindingProcessor.processWidget(outputText, elementName, attributes, (StaticUIMetawidget) metawidget);
               }

               String styleClassEl = StaticFacesUtils.unwrapExpression(outputText.getValue())
                        + " ? 'boolean-true' : 'boolean-false'";
               outputText.putAttribute("styleClass", StaticFacesUtils.wrapExpression(styleClassEl));
               outputText.setValue("");

               return outputText;
            }
         }
      }
View Full Code Here

Examples of org.metawidget.statically.faces.component.html.widgetbuilder.HtmlOutputText

         {
            // Render read-only booleans as graphics

            if (boolean.class.equals(clazz))
            {
               HtmlOutputText outputText = new HtmlOutputText();
               StandardBindingProcessor bindingProcessor = metawidget
                        .getWidgetProcessor(StandardBindingProcessor.class);

               if (bindingProcessor != null)
               {
                  bindingProcessor.processWidget(outputText, elementName, attributes, (StaticUIMetawidget) metawidget);
               }

               String styleClassEl = StaticFacesUtils.unwrapExpression(outputText.getValue())
                        + " ? 'boolean-true' : 'boolean-false'";
               outputText.putAttribute("styleClass", StaticFacesUtils.wrapExpression(styleClassEl));
               outputText.setValue("");

               return outputText;
            }

         }
View Full Code Here

Examples of org.metawidget.statically.faces.component.html.widgetbuilder.HtmlOutputText

         {
            // Render read-only booleans as graphics

            if (boolean.class.equals(clazz))
            {
               HtmlOutputText outputText = new HtmlOutputText();
               StandardBindingProcessor bindingProcessor = metawidget
                        .getWidgetProcessor(StandardBindingProcessor.class);

               if (bindingProcessor != null)
               {
                  bindingProcessor.processWidget(outputText, elementName, attributes, (StaticUIMetawidget) metawidget);
               }

               String styleClassEl = StaticFacesUtils.unwrapExpression(outputText.getValue())
                        + " ? 'boolean-true' : 'boolean-false'";
               outputText.putAttribute("styleClass", StaticFacesUtils.wrapExpression(styleClassEl));
               outputText.setValue("");

               return outputText;
            }
           
         }
View Full Code Here

Examples of org.metawidget.statically.faces.component.html.widgetbuilder.HtmlOutputText

         {
            // Render read-only booleans as graphics

            if (boolean.class.equals(clazz))
            {
               HtmlOutputText outputText = new HtmlOutputText();
               StandardBindingProcessor bindingProcessor = metawidget
                        .getWidgetProcessor(StandardBindingProcessor.class);

               if (bindingProcessor != null)
               {
                  bindingProcessor.processWidget(outputText, elementName, attributes, (StaticUIMetawidget) metawidget);
               }

               String styleClassEl = StaticFacesUtils.unwrapExpression(outputText.getValue())
                        + " ? 'boolean-true' : 'boolean-false'";
               outputText.putAttribute("styleClass", StaticFacesUtils.wrapExpression(styleClassEl));
               outputText.setValue("");

               return outputText;
            }
         }
      }
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.