addButton.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
String hostString = hostField.getText();
String portString = portField.getText();
// TODO(zundel): some kind of validation
WhitelistEntry whitelistEntry = WhitelistEntry.create(hostString,
portString);
String validationErrors = whitelistEntry.getValidationErrors();
if (validationErrors != null) {
WindowExt.alert("Error: " + validationErrors);
} else {
whitelistTable.addWhitelistEntry(whitelistEntry);
whitelistModel.saveEntries(whitelistTable.getEntries());