/** * Sets the value of the "value" property. * @param newValue the value property */ public void jsxSet_value(final String newValue) { getDomNodeOrNull().setValueAttribute(newValue); }
/** * Sets the value of the "value" property. * @param newValue the value property */ public void jsxSet_value(final String newValue) { getDomNodeOrNull().setValueAttribute(newValue); }
/** * Sets the value of the "value" property. * @param newValue the value property */ public void jsxSet_value(final String newValue) { getDomNodeOrNull().setValueAttribute(newValue); }
/** * Sets the value of the {@code value} property. * @param newValue the value property */ @JsxSetter public void setValue(final String newValue) { final DomNode dom = getDomNodeOrNull(); if (dom instanceof HtmlOption) { ((HtmlOption) dom).setValueAttribute(newValue); } }
/** * Sets the value of the {@code value} property. * @param newValue the value property */ @JsxSetter public void setValue(final String newValue) { final DomNode dom = getDomNodeOrNull(); if (dom instanceof HtmlOption) { ((HtmlOption) dom).setValueAttribute(newValue); } }
/** * JavaScript constructor. This must be declared in every JavaScript file because * the rhino engine won't walk up the hierarchy looking for constructors. * @param newText the text * @param newValue the value * @param defaultSelected Whether the option is initially selected * @param selected the current selection state of the option */ public void jsConstructor(final String newText, final String newValue, final boolean defaultSelected, final boolean selected) { final HtmlPage page = (HtmlPage) getWindow().getWebWindow().getEnclosedPage(); AttributesImpl attributes = null; if (defaultSelected) { attributes = new AttributesImpl(); attributes.addAttribute(null, "selected", "selected", null, "selected"); } final HtmlOption htmlOption = (HtmlOption) HTMLParser.getFactory(HtmlOption.TAG_NAME).createElement( page, HtmlOption.TAG_NAME, attributes); htmlOption.setSelected(selected); setDomNode(htmlOption); if (newText != null && !newText.equals("undefined")) { htmlOption.appendChild(new DomText(page, newText)); } if (newValue != null && !newValue.equals("undefined")) { htmlOption.setValueAttribute(newValue); } }
/** * JavaScript constructor. This must be declared in every JavaScript file because * the rhino engine won't walk up the hierarchy looking for constructors. * @param newText the text * @param newValue the value * @param defaultSelected Whether the option is initially selected * @param selected the current selection state of the option */ public void jsConstructor(final String newText, final String newValue, final boolean defaultSelected, final boolean selected) { final HtmlPage page = (HtmlPage) getWindow().getWebWindow().getEnclosedPage(); AttributesImpl attributes = null; if (defaultSelected) { attributes = new AttributesImpl(); attributes.addAttribute(null, "selected", "selected", null, "selected"); } final HtmlOption htmlOption = (HtmlOption) HTMLParser.getFactory(HtmlOption.TAG_NAME).createElement( page, HtmlOption.TAG_NAME, attributes); htmlOption.setSelected(selected); setDomNode(htmlOption); if (newText != null && !newText.equals("undefined")) { htmlOption.appendChild(new DomText(page, newText)); } if (newValue != null && !newValue.equals("undefined")) { htmlOption.setValueAttribute(newValue); } }
/** * JavaScript constructor. This must be declared in every JavaScript file because * the rhino engine won't walk up the hierarchy looking for constructors. * @param newText the text * @param newValue the value * @param defaultSelected Whether the option is initially selected * @param selected the current selection state of the option */ public void jsConstructor(final String newText, final String newValue, final boolean defaultSelected, final boolean selected) { final HtmlPage page = (HtmlPage) getWindow().getWebWindow().getEnclosedPage(); AttributesImpl attributes = null; if (defaultSelected) { attributes = new AttributesImpl(); attributes.addAttribute(null, "selected", "selected", null, "selected"); } final HtmlOption htmlOption = (HtmlOption) HTMLParser.getFactory(HtmlOption.TAG_NAME).createElement( page, HtmlOption.TAG_NAME, attributes); htmlOption.setSelected(selected); setDomNode(htmlOption); if (newText != null && !newText.equals("undefined")) { htmlOption.appendChild(new DomText(page, newText)); } if (newValue != null && !newValue.equals("undefined")) { htmlOption.setValueAttribute(newValue); } }
/** * JavaScript constructor. * @param newText the text * @param newValue the value * @param defaultSelected Whether the option is initially selected * @param selected the current selection state of the option */ @JsxConstructor({CHROME, FF, EDGE}) public void jsConstructor(final String newText, final String newValue, final boolean defaultSelected, final boolean selected) { final HtmlPage page = (HtmlPage) getWindow().getWebWindow().getEnclosedPage(); AttributesImpl attributes = null; if (defaultSelected) { attributes = new AttributesImpl(); attributes.addAttribute(null, "selected", "selected", null, "selected"); } final HtmlOption htmlOption = (HtmlOption) HTMLParser.getFactory(HtmlOption.TAG_NAME).createElement( page, HtmlOption.TAG_NAME, attributes); htmlOption.setSelected(selected); setDomNode(htmlOption); if (!"undefined".equals(newText)) { htmlOption.appendChild(new DomText(page, newText)); htmlOption.setLabelAttribute(newText); } if (!"undefined".equals(newValue)) { htmlOption.setValueAttribute(newValue); } }
/** * JavaScript constructor. * @param newText the text * @param newValue the value * @param defaultSelected Whether the option is initially selected * @param selected the current selection state of the option */ @JsxConstructor({CHROME, FF, EDGE}) public void jsConstructor(final String newText, final String newValue, final boolean defaultSelected, final boolean selected) { final HtmlPage page = (HtmlPage) getWindow().getWebWindow().getEnclosedPage(); AttributesImpl attributes = null; if (defaultSelected) { attributes = new AttributesImpl(); attributes.addAttribute(null, "selected", "selected", null, "selected"); } final HtmlOption htmlOption = (HtmlOption) HTMLParser.getFactory(HtmlOption.TAG_NAME).createElement( page, HtmlOption.TAG_NAME, attributes); htmlOption.setSelected(selected); setDomNode(htmlOption); if (!"undefined".equals(newText)) { htmlOption.appendChild(new DomText(page, newText)); htmlOption.setLabelAttribute(newText); } if (!"undefined".equals(newValue)) { htmlOption.setValueAttribute(newValue); } }