Skip to content

Instantly share code, notes, and snippets.

@bleathem
Created November 19, 2012 18:30
Show Gist options
  • Save bleathem/4112562 to your computer and use it in GitHub Desktop.
Save bleathem/4112562 to your computer and use it in GitHub Desktop.
@EntryPoint
public class PickListApp {
@Inject
private List<String> capitalsList;
@PostConstruct
public void init() {
LogUtil.log("****************** this is a test *************");
List<LIElement> sourceList = new ArrayList<LIElement>(capitalsList.size());
for (String capital : capitalsList) {
LIElement li = Document.get().createLIElement();
li.setInnerText(capital);
li.setAttribute("data-key", capital);
sourceList.add(li);
}
List<LIElement> targetList = new ArrayList<LIElement>();
RootPanel.get().add(new InlineHTML("Some text"));
RootPanel.get("myPickList").add(new PickListWidget(sourceList, targetList));
System.out.println("UI Constructed!");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment