Package javax.faces.component.html

Examples of javax.faces.component.html.HtmlOutputLabel


  /*------------------------------------------------------------------------------
     <h:outputLabel value="Nom: " />
  ------------------------------------------------------------------------------*/
  public static HtmlOutputLabel buildOutputLabel(String displayValue)
  {
      HtmlOutputLabel label = new HtmlOutputLabel();
 
      label.setValue(displayValue);
     
      return label;
     
  }
View Full Code Here


        Assert.assertNotNull(input19);

        HtmlInputText input20 = (HtmlInputText) form.findComponent("input20");
        Assert.assertNotNull(input20);
       
        HtmlOutputLabel label1 = (HtmlOutputLabel) form.findComponent("label1");
        Assert.assertNotNull(label1);
       
        HtmlSelectOneListbox select1 = (HtmlSelectOneListbox) form.findComponent("select1");
        Assert.assertNotNull(select1);
       
View Full Code Here

        clay.encodeBegin(facesContext);

    }

    public void testConverterComponentType() {
        HtmlOutputLabel label = (HtmlOutputLabel) findComponent(clay, "testlabel1");
        assertNotNull(label);
       
        assertNotNull(label.getConverter());
        assertTrue(label.getConverter() instanceof BooleanConverter);
    }
View Full Code Here

        assertNotNull(label.getConverter());
        assertTrue(label.getConverter() instanceof BooleanConverter);
    }

    public void testConverterIdOverride() {
        HtmlOutputLabel label = (HtmlOutputLabel) findComponent(clay, "testlabel2");
        assertNotNull(label);
       
        assertNotNull(label.getConverter());
        assertTrue(label.getConverter() instanceof BooleanConverter);
    }
View Full Code Here

    checkBox.setId(sCheckboxId);
    checkBox.setSelected(getOpen());
    checkBox.setOnclick(sbOnclick.toString());
    headerTable.getChildren().add(checkBox);
   
    HtmlOutputLabel caption = new HtmlOutputLabel();
    // even label has to have unique id (for GlassFish)
    caption.setId(sCheckboxId+"label");
    caption.setFor(sCheckboxId);
    caption.setValue(sCaption);
    caption.setStyleClass("sectionCaption");
    headerTable.getChildren().add(caption);
    panel.getChildren().add(headerTable);   
   
  } else {
   
    HtmlPanelGrid headerTable = new HtmlPanelGrid();
    headerTable.setColumns(3);
    headerTable.setStyleClass("mandatorySectionHeader");
    headerTable.setSummary(msgBroker.retrieveMessage("catalog.general.designOnly"));
    headerTable.setOnclick(sbOnclick.toString());
   
    HtmlSelectBooleanCheckbox checkBox = new HtmlSelectBooleanCheckbox();
    checkBox.setId(sCheckboxId);
    checkBox.setSelected(getOpen());
    //checkBox.setOnclick(sbOnclick.toString());
    checkBox.setStyle("display:none;");
    headerTable.getChildren().add(checkBox);
   
    HtmlGraphicImage img = new HtmlGraphicImage();
    img.setId(sImgId);
    setGraphicUrl(img);
    headerTable.getChildren().add(img);
   
    HtmlOutputText caption = new HtmlOutputText();
    caption.setValue(sCaption);
    caption.setStyleClass("sectionCaption");
   
    headerTable.getChildren().add(caption);
    if (getLabel() != null) {
      panel.getChildren().add(headerTable);
    } else {
View Full Code Here

* @return the UI component
*/
public UIComponent makeEditorLabel(UiContext context,
                                   Section section,
                                   Parameter parameter) {
  HtmlOutputLabel outLabel = new HtmlOutputLabel();
  MessageBroker msgBroker = context.extractMessageBroker();
  if (parameter.getInput() != null) {
    // even label has to have unique id (for GlassFish)
    outLabel.setId(parameter.getInput().getFacesId()+"label");
    outLabel.setFor(parameter.getInput().getFacesId());
  }
  outLabel.setValue(msgBroker.retrieveMessage(getResourceKey()));
  if (parameter.getValidation().getRequired()) {
    outLabel.setStyleClass("requiredField");
  }
  return outLabel;
}
View Full Code Here

    // listbox id
    String listBoxId = "recsPerPage";
   
    // Display label
    HtmlOutputLabel resultsPerPageLabel =
      makeResultsLabel(facesContext, sRecordsPerPageMsg);
    resultsPerPagePanelGroup.getChildren().add(resultsPerPageLabel);
    resultsPerPageLabel.setFor(listBoxId);

    // Create lisbox
    HtmlSelectOneListbox listBox = new HtmlSelectOneListbox();
    resultsPerPagePanelGroup.getChildren().add(listBox);
    listBox.setId(listBoxId);
View Full Code Here

* @param facesContext the active Faces context
* @param text the text to display
* @return the new HtmlOutputLabel component
*/
private HtmlOutputLabel makeResultsLabel(FacesContext facesContext, String text) {
  HtmlOutputLabel outLabel = new HtmlOutputLabel();
  outLabel.setEscape(false);
  outLabel.setValue(text);
  if (getResultStyleClass().length() > 0) {
    outLabel.setStyleClass(getResultStyleClass());
  }
  return outLabel;
}
View Full Code Here

    String sLabel = sKey;
    String sResKey = code.getResourceKey();
    if (sResKey.length() > 0) {
      sLabel = msgBroker.retrieveMessage(sResKey);
    }
    HtmlOutputLabel outLabel = new HtmlOutputLabel();
    // even label has to have unique id (for GlassFish)
    outLabel.setId(sId+"label");
    outLabel.setFor(sId);
    outLabel.setValue(sLabel);
    panel.getChildren().add(outLabel);
    panel.getChildren().add(makeBR());
  }

  return panel;
View Full Code Here

        if (children != null) {

          for (UIComponent child : children) {

            if (child instanceof HtmlOutputLabel) {
              HtmlOutputLabel htmlOutputLabel = (HtmlOutputLabel) child;

              if (uiComponent.getId().equals(htmlOutputLabel.getFor())) {
                Object labelValue = htmlOutputLabel.getValue();

                if (labelValue != null) {
                  siblingLabelValue = labelValue.toString();
                }
              }
View Full Code Here

TOP

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

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.