gpt4 book ai didi

com.manydesigns.elements.xml.XhtmlBuffer.addAttribute()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-24 22:21:05 25 4
gpt4 key购买 nike

本文整理了Java中com.manydesigns.elements.xml.XhtmlBuffer.addAttribute()方法的一些代码示例,展示了XhtmlBuffer.addAttribute()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XhtmlBuffer.addAttribute()方法的具体详情如下:
包路径:com.manydesigns.elements.xml.XhtmlBuffer
类名称:XhtmlBuffer
方法名:addAttribute

XhtmlBuffer.addAttribute介绍

暂无

代码示例

代码示例来源:origin: ManyDesigns/Portofino

public void openFormElement(String id, String method,
              String action, String htmlClass) {
  openElement("form");
  addAttribute("id", id);
  addAttribute("method", method);
  addAttribute("action", action);
  addAttribute("class", htmlClass);
}

代码示例来源:origin: com.manydesigns/elements

public void writeLink(String rel, String type, String href) {
  openElement("link");
  addAttribute("rel", rel);
  addAttribute("type", type);
  addAttribute("href", href);
  closeElement("link");
}

代码示例来源:origin: ManyDesigns/Portofino

public void writeInputHidden(String name, String value) {
  openElement("input");
  addAttribute("type", "hidden");
  addAttribute("name", name);
  addAttribute("value", value);
  closeElement("input");
}

代码示例来源:origin: ManyDesigns/Portofino

public void writeLink(String rel, String type, String href) {
  openElement("link");
  addAttribute("rel", rel);
  addAttribute("type", type);
  addAttribute("href", href);
  closeElement("link");
}

代码示例来源:origin: com.manydesigns/portofino-calendar

public static void writeDialogCloseButtonInFooter(XhtmlBuffer xhtmlBuffer) {
  xhtmlBuffer.openElement("button");
  xhtmlBuffer.addAttribute("class", "btn btn-primary");
  xhtmlBuffer.addAttribute("data-dismiss", "modal");
  xhtmlBuffer.addAttribute("aria-hidden", "true");
  xhtmlBuffer.write(ElementsThreadLocals.getText("close"));
  xhtmlBuffer.closeElement("button");
}

代码示例来源:origin: com.manydesigns/elements

public void labelToXhtml(XhtmlBuffer xb, String actualHtmlId,
             String actualLabel) {
  xb.openElement("label");
  xb.addAttribute("for", actualHtmlId);
  xb.addAttribute("class", FORM_LABEL_CSS_CLASS);
  xb.write(StringUtils.capitalize(actualLabel));
  xb.closeElement("label");
}

代码示例来源:origin: com.manydesigns/elements

public void writeOption(String value, boolean selected, String text) {
  openElement("option");
  addAttribute("value", value);
  if (selected) {
    addAttribute("selected", "selected");
  }
  write(text);
  closeElement("option");
}

代码示例来源:origin: com.manydesigns/elements

protected void valueToXhtmlView(XhtmlBuffer xb) {
  xb.openElement("p");
  xb.addAttribute("class", STATIC_VALUE_CSS_CLASS);
  xb.addAttribute("id", id);
  xb.write(PASSWORD_PLACEHOLDER);
  xb.closeElement("p");
}

代码示例来源:origin: ManyDesigns/Portofino

public void writeLabel(String text, String forId, String htmlClass) {
  openElement("label");
  if (forId != null) {
    addAttribute("for", forId);
  }
  addAttribute("class", htmlClass);
  write(text);
  closeElement("label");
}

代码示例来源:origin: ManyDesigns/Portofino

public void writeOption(String value, boolean selected, String text) {
  openElement("option");
  addAttribute("value", value);
  if (selected) {
    addAttribute("selected", "selected");
  }
  write(text);
  closeElement("option");
}

代码示例来源:origin: com.manydesigns/elements

protected void valueToXhtmlView(XhtmlBuffer xb) {
  xb.openElement("div");
  xb.addAttribute("class", STATIC_VALUE_CSS_CLASS);
  xb.addAttribute("id", id);
  if (href == null) {
    xb.write(stringValue);
  } else {
    xb.writeAnchor(href, stringValue, null, title);
  }
  xb.closeElement("div");
}

代码示例来源:origin: com.manydesigns/elements

public void toXhtml(@NotNull XhtmlBuffer xb) {
  xb.openElement("div");
  xb.addAttribute("class", "searchform");
  for (SearchField current : this) {
    current.toXhtml(xb);
  }
  xb.closeElement("div");
}

代码示例来源:origin: com.manydesigns/elements

public void rangeEndToXhtml(XhtmlBuffer xb, String id,
              String inputName, String stringValue,
              String label) {
  xb.openElement("label");
  xb.addAttribute("class", "input-group-addon");
  xb.addAttribute("for", id);
  xb.write(label);
  xb.closeElement("label");
  xb.writeInputText(id, inputName, stringValue, FORM_CONTROL_CSS_CLASS, size, maxLength);
  xb.write(" ");
}

代码示例来源:origin: ManyDesigns/Portofino

public void helpToXhtml(XhtmlBuffer xb) {
  if (help != null) {
    xb.openElement("span");
    xb.addAttribute("class", "help-block");
    xb.write(help);
    xb.closeElement("span");
  }
}

代码示例来源:origin: com.manydesigns/portofino-pageactions

@Override
public void toXhtml(@NotNull XhtmlBuffer xb) {
  xb.openElement("div");
  xb.addAttribute("class", "media");
  writeImage(xb);
  writeBody(xb);
  xb.closeElement("div");
}

代码示例来源:origin: com.manydesigns/elements

public void errorsToXhtml(XhtmlBuffer xb) {
  if (!isValid()) {
    xb.openElement("span");
    xb.addAttribute("class", "help-block");
    for (String error : errors) {
      xb.write(error);
      xb.writeBr();
    }
    xb.closeElement("span");
  }
}

代码示例来源:origin: ManyDesigns/Portofino

public void writeBody(XhtmlBuffer xb) {
  xb.openElement("div");
  xb.addAttribute("class", "media-body");
  writeData(xb);
  writeTimestamp(xb);
  writeMessage(xb);
  xb.closeElement("div");
}

代码示例来源:origin: com.manydesigns/portofino-pageactions

public void writeBody(XhtmlBuffer xb) {
  xb.openElement("div");
  xb.addAttribute("class", "media-body");
  writeData(xb);
  writeTimestamp(xb);
  writeMessage(xb);
  xb.closeElement("div");
}

代码示例来源:origin: com.manydesigns/portofino-pageactions

public void writeTimestamp(XhtmlBuffer xb) {
  xb.openElement("div");
  xb.openElement("small");
  xb.addAttribute("class", "text-muted");
  xb.write(dateFormat.format(timestamp));
  xb.closeElement("small");
  xb.closeElement("div");
}

代码示例来源:origin: ManyDesigns/Portofino

public void writeTimestamp(XhtmlBuffer xb) {
  xb.openElement("div");
  xb.openElement("small");
  xb.addAttribute("class", "text-muted");
  xb.write(dateFormat.format(timestamp));
  xb.closeElement("small");
  xb.closeElement("div");
}

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com