Package org.apache.myfaces.tobago.webapp

Examples of org.apache.myfaces.tobago.webapp.TobagoResponseWriter.writeStyleAttribute()


    writer.endElement(HtmlElements.SELECT);
    writer.startElement(HtmlElements.DIV, null);
    style.setLeft(style.getLeft().add(selectWidth));
    style.setWidth(buttonWidth);
    writer.writeStyleAttribute(style);
    writer.startElement(HtmlElements.DIV, null);
    writer.writeClassAttribute(Classes.create(select, "toolBar"));
    createButton(facesContext, component, writer, disabled, "image/selectManyShuttleAddAll.gif", "addAll");
    createButton(facesContext, component, writer, disabled, "image/selectManyShuttleAdd.gif", "add");
    createButton(facesContext, component, writer, disabled, "image/selectManyShuttleRemove.gif", "remove");
View Full Code Here


    writer.endElement(HtmlElements.DIV);
    String selectedLabel = select.getSelectedLabel();
    if (selectedLabel != null) {
      writer.startElement(HtmlElements.DIV, null);
      labelStyle.setLeft(labelStyle.getLeft().add(selectWidth).add(buttonWidth));
      writer.writeStyleAttribute(labelStyle);
      writer.writeClassAttribute(Classes.create(select, "selectedLabel"));
      writer.flush(); // is needed in some cases, e. g. TOBAGO-1094
      writer.write(selectedLabel);
      writer.endElement(HtmlElements.DIV);
    }
View Full Code Here

    if (tabIndex != null) {
      writer.writeAttribute(HtmlAttributes.TABINDEX, tabIndex);
    }
    style.setWidth(selectWidth);
    style.setLeft(style.getLeft().add(buttonWidth));
    writer.writeStyleAttribute(style);
    writer.writeClassAttribute(Classes.create(select, "selected"));
    writer.writeAttribute(HtmlAttributes.MULTIPLE, HtmlAttributes.MULTIPLE, false);
    HtmlRendererUtils.renderSelectItems(select, items, values, true, writer, facesContext);

    writer.endElement(HtmlElements.SELECT);
View Full Code Here

    Integer tabIndex = select.getTabIndex();
    if (tabIndex != null) {
      writer.writeAttribute(HtmlAttributes.TABINDEX, tabIndex);
    }
    Style style = new Style(facesContext, select);
    writer.writeStyleAttribute(style);
    writer.writeClassAttribute(Classes.create(select));
    if (title != null) {
      writer.writeAttribute(HtmlAttributes.TITLE, title, true);
    }
    String onchange = HtmlUtils.generateOnchange(select, facesContext);
View Full Code Here

    Style style = new Style(facesContext, panel);
    // XXX hotfix for panels in sheets
    if (style.getPosition() == null) {
      style.setPosition(Position.RELATIVE);
    }
    writer.writeStyleAttribute(style);
    if (panel instanceof UIPanel && ((UIPanel) panel).getTip() != null) {
      writer.writeAttribute(HtmlAttributes.TITLE, ((UIPanel) panel).getTip(), true);
    }

    // TODO check ajax id?
View Full Code Here

      if (inner.getHeight() != null) {
        inner.setHeight(inner.getHeight().subtract(borderTop).subtract(borderBottom));
      }
      inner.setLeft(borderLeft);
      inner.setTop(borderTop);
      writer.writeStyleAttribute(inner);
    }
  }

  @Override
  public void encodeEnd(FacesContext facesContext, UIComponent component) throws IOException {
View Full Code Here

    writer.startElement(HtmlElements.OL, menuBar);
    writer.writeIdAttribute(menuBar.getClientId(facesContext));
    writer.writeClassAttribute(Classes.create(menuBar));
    HtmlRendererUtils.writeDataAttributes(facesContext, writer, menuBar);
    Style style = new Style(facesContext, menuBar);
    writer.writeStyleAttribute(style);
  }

  @Override
  public void encodeEnd(FacesContext facesContext, UIComponent component) throws IOException {
    TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
View Full Code Here

    Style style = new Style(facesContext, toolBar);
    boolean right = UIToolBar.ORIENTATION_RIGHT.equals(toolBar.getOrientation());
    if (right) {
      style.setTextAlign(TextAlign.RIGHT);
    }
    writer.writeStyleAttribute(style);
    super.encodeEnd(facesContext, toolBar);
    writer.endElement(HtmlElements.DIV);
  }

  @Override
View Full Code Here

    writer.startElement(HtmlElements.TABLE, slider);
    writer.writeIdAttribute(id);
    writer.writeClassAttribute(Classes.create(slider));
    HtmlRendererUtils.writeDataAttributes(facesContext, writer, slider);
    writer.writeStyleAttribute(style);
    //writer.writeAttribute(HtmlAttributes.BORDER,"1",false);

    writer.startElement(HtmlElements.TR, null);
    writer.startElement(HtmlElements.TD, null);
    writer.writeClassAttribute(Classes.create(slider, "min"));
View Full Code Here

    writer.startElement(HtmlElements.TD, null);
    writer.writeClassAttribute(Classes.create(slider, "min"));

    Style widthStyle = new Style();
    widthStyle.setWidth(Measure.valueOf(sliderWidth / 2));
    writer.writeStyleAttribute(widthStyle);
    writer.startElement(HtmlElements.SPAN, null);
    writer.writeClassAttribute(Classes.create(slider, "min"));
    writer.write(Integer.toString(min));
    writer.endElement(HtmlElements.SPAN);
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.