Examples of HtmlOutputLabel


Examples of javax.faces.component.html.HtmlOutputLabel


  @Override
  public void encodeBegin(FacesContext context) throws IOException {
    // add label and input components when the view is loaded for the first time
    HtmlOutputLabel labelComponent = null;
    UIInput inputComponent = null;
    if (getChildCount() > 0)
    {
      labelComponent = (HtmlOutputLabel)getChildren().get(0);
      inputComponent = (UIInput)getChildren().get(1);
    }
    if (labelComponent == null)
    {
      labelComponent = createOutputLabelForCol();
      this.getChildren().add(labelComponent);
    }
    if (inputComponent == null)
    {
      inputComponent = createInputComponentForCol();
      this.getChildren().add(inputComponent);
    }

    // render components
    context.getResponseWriter().startElement("div", null);
    labelComponent.encodeAll(context);
    inputComponent.encodeAll(context);
    context.getResponseWriter().endElement("div");

    super.encodeBegin(context);
  }
View Full Code Here

Examples of javax.faces.component.html.HtmlOutputLabel

    return input;
  }

  private HtmlOutputLabel createOutputLabelForCol() {
    DBTableColumn col = getColumn();
    HtmlOutputLabel label = new HtmlOutputLabel();
    String colName = getLabelString()+":";
    if (col.isRequired()) {
      colName += "*";
    }
    label.setId(this.getId() + LABEL_SUFFIX);
    label.setValue(colName);
    return label;
  }
View Full Code Here

Examples of javax.faces.component.html.HtmlOutputLabel

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

  super.setProperties(component);

  if (_onmouseover != null)
  {
    comp.setValueExpression("onmouseover", _onmouseover);
  }
  if (_dir != null)
  {
    comp.setValueExpression("dir", _dir);
  }
  if (_onkeypress != null)
  {
    comp.setValueExpression("onkeypress", _onkeypress);
  }
  if (_onkeyup != null)
  {
    comp.setValueExpression("onkeyup", _onkeyup);
  }
  if (_accesskey != null)
  {
    comp.setValueExpression("accesskey", _accesskey);
  }
  if (_tabindex != null)
  {
    comp.setValueExpression("tabindex", _tabindex);
  }
  if (_onfocus != null)
  {
    comp.setValueExpression("onfocus", _onfocus);
  }
  if (_style != null)
  {
    comp.setValueExpression("style", _style);
  }
  if (_onmousemove != null)
  {
    comp.setValueExpression("onmousemove", _onmousemove);
  }
  if (_escape != null)
  {
    comp.setValueExpression("escape", _escape);
  }
  if (_value != null)
  {
    comp.setValueExpression("value", _value);
  }
  if (_onmouseout != null)
  {
    comp.setValueExpression("onmouseout", _onmouseout);
  }
  if (_ondblclick != null)
  {
    comp.setValueExpression("ondblclick", _ondblclick);
  }
  if (_onkeydown != null)
  {
    comp.setValueExpression("onkeydown", _onkeydown);
  }
  if (_onclick != null)
  {
    comp.setValueExpression("onclick", _onclick);
  }
  if (_onmousedown != null)
  {
    comp.setValueExpression("onmousedown", _onmousedown);
  }
  if (_for != null)
  {
    comp.setValueExpression("for", _for);
  }
  if (_onmouseup != null)
  {
    comp.setValueExpression("onmouseup", _onmouseup);
  }
  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 (_onblur != null)
  {
    comp.setValueExpression("onblur", _onblur);
  }
  if (_lang != null)
  {
    comp.setValueExpression("lang", _lang);
  }
  if (_title != null)
  {
    comp.setValueExpression("title", _title);
  }
  if (_styleClass != null)
  {
    comp.setValueExpression("styleClass", _styleClass);
  }
}
View Full Code Here

Examples of javax.faces.component.html.HtmlOutputLabel


    @Override
    protected UIComponent createComponentToTest()
    {
        return new HtmlOutputLabel();
    }
View Full Code Here

Examples of javax.faces.component.html.HtmlOutputLabel

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

        outputText = new HtmlOutputText();
        outputLabel = new HtmlOutputLabel();
        selectOneRadio = new HtmlSelectOneRadio();
        selectOneListbox = new HtmlSelectOneListbox();
        selectOneMenu = new HtmlSelectOneMenu();
        selectManyCheckbox = new HtmlSelectManyCheckbox();
        selectManyListbox = new HtmlSelectManyListbox();
View Full Code Here

Examples of javax.faces.component.html.HtmlOutputLabel

        return new TestSuite(HtmlLabelRendererTest.class);
    }
   
    public void setUp() throws Exception {
        super.setUp();
        label = new HtmlOutputLabel();
        writer = new MockResponseWriter(new StringWriter(), null, null);
        facesContext.setResponseWriter(writer);
       
        facesContext.getViewRoot().setRenderKitId(MockRenderKitFactory.HTML_BASIC_RENDER_KIT);
        facesContext.getRenderKit().addRenderer(
View Full Code Here

Examples of javax.faces.component.html.HtmlOutputLabel

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

        outputText = new HtmlOutputText();
        outputLabel = new HtmlOutputLabel();
        selectOneRadio = new HtmlSelectOneRadio();
        selectOneListbox = new HtmlSelectOneListbox();
        selectOneMenu = new HtmlSelectOneMenu();
        selectManyCheckbox = new HtmlSelectManyCheckbox();
        selectManyListbox = new HtmlSelectManyListbox();
View Full Code Here

Examples of javax.faces.component.html.HtmlOutputLabel


    @Override
    protected UIComponent createComponentToTest()
    {
        return new HtmlOutputLabel();
    }
View Full Code Here

Examples of javax.faces.component.html.HtmlOutputLabel


    @Override
    protected UIComponent createComponentToTest()
    {
        return new HtmlOutputLabel();
    }
View Full Code Here

Examples of javax.faces.component.html.HtmlOutputLabel

                    cmp = app.createComponent(Calendar.COMPONENT_TYPE);
                    ((Calendar)cmp).setValueExpression(VALUE_NAME, getExpression(valExp));
                    break;
            }

            HtmlOutputLabel label = (HtmlOutputLabel) app.createComponent(HtmlOutputLabel.COMPONENT_TYPE);
            label.setValueExpression(VALUE_NAME, getExpression(String.format(labelVar, attr.getName())));

            panel.getChildren().add(label);
            panel.getChildren().add(cmp);
        }
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.