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);
}
}