List of usage examples for com.google.gwt.user.client DOM createOption
public static Element createOption()
From source file:com.eduworks.russel.ui.client.pagebuilder.screen.GroupScreen.java
License:Apache License
private void makeOption(final String val, String elementName) { Element e = DOM.getElementById(elementName); Element a = DOM.createOption(); a.setInnerText(val); e.appendChild(a);/*from w w w. j a v a 2s .co m*/ }
From source file:com.eduworks.russel.ui.client.pagebuilder.screen.UserScreen.java
License:Apache License
private void makeOption(final String username, String eName) { Element e = DOM.getElementById(eName); Element a = DOM.createOption(); a.setInnerText(username);/*from w w w. j a va 2 s . c o m*/ e.appendChild(a); }
From source file:com.horaz.client.widgets.SelectMenu.java
License:Open Source License
/** * generates a new option element. see {@link #setOptions(OptionElement[])} * how to add options to a select element * @param text/*from w w w . j a va 2 s . co m*/ * @param value * @return */ public static OptionElement createOption(String text, String value) { OptionElement o = OptionElement.as(DOM.createOption()); o.setText(text); o.setValue(value); return o; }