public SwitchButton() { Style.of(formControl).setProperty("border-bottom", "0px"); formControl.appendChild(onOffLabelElement); onOffLabelElement.appendChild(offTitleTextRoot.asElement()); onOffLabelElement.appendChild(inputElement); onOffLabelElement.appendChild(lever.asElement()); onOffLabelElement.appendChild(onTitleTextRoot.asElement()); inputElement.addEventListener("change", evt -> { evt.stopPropagation(); if (!isReadOnly()) { onCheck(); if (autoValidation) validate(); } }); formLine.appendChild(formControl); formLine.appendChild(labelElement); container.appendChild(formLine); init(this); }
public Radio setHelperText(String text) { helperTextElement.setTextContent(text); if (!DominoElement.of(labelElement).contains(helperTextElement.asElement())) { labelElement.appendChild(helperTextElement.asElement()); } return this; }
public SwitchButton() { Style.of(formControl).setProperty("border-bottom", "0px"); formControl.appendChild(onOffLabelElement); onOffLabelElement.appendChild(offTitleTextRoot.asElement()); onOffLabelElement.appendChild(inputElement); onOffLabelElement.appendChild(lever.asElement()); onOffLabelElement.appendChild(onTitleTextRoot.asElement()); inputElement.addEventListener("change", evt -> { evt.stopPropagation(); if (!isReadOnly()) { onCheck(); if (autoValidation) validate(); } }); formLine.appendChild(formControl); formLine.appendChild(labelElement); container.appendChild(formLine); init(this); }
public Radio setHelperText(String text) { helperTextElement.setTextContent(text); if (!DominoElement.of(labelElement).contains(helperTextElement.asElement())) { labelElement.appendChild(helperTextElement.asElement()); } return this; }