View Javadoc

    1   package sharin.doc.builder.xhtml1;
    2
    3   public class OptionElem extends GenericCommonElem<OptionElem> {
    4
    5       public OptionElem(Object... nodes) {
    6           super("option", nodes);
    7       }
    8
    9       public OptionElem disabled(boolean disabled) {
    10          return disabled ? disabled("disabled") : this;
    11      }
    12
    13      public OptionElem disabled(Object value) {
    14          return attr("disabled", value);
    15      }
    16
    17      public OptionElem label(Object value) {
    18          return attr("label", value);
    19      }
    20
    21      public OptionElem selected(boolean selected) {
    22          return selected ? selected("selected") : this;
    23      }
    24
    25      public OptionElem selected(Object value) {
    26          return attr("selected", value);
    27      }
    28
    29      public OptionElem value(Object value) {
    30          return attr("value", value);
    31      }
    32  }