layout.setStyleName("fill-layout-width");
final Form<HttpConnector> form = new Form<HttpConnector>(HttpConnector.class);
TextBoxItem name = new TextBoxItem("name", "Name");
SuggestBoxItem socket = new SuggestBoxItem("socketBinding", "Socket Binding") {
private String errOrig;
@Override
public boolean validate(String value) {
boolean parentValid = super.validate(value);
boolean bindingValid = true;
if(parentValid)
{
for(HttpConnector existing : connectors)
{
if(existing.getSocketBinding().equals(value))
{
errOrig = getErrMessage();
setErrMessage("Socket binding already in use");
bindingValid = false;
}
}
}
return parentValid && bindingValid;
}
};
MultiWordSuggestOracle oracle = new MultiWordSuggestOracle();
oracle.addAll(socketBindings);
socket.setOracle(oracle);
//socket.setValueMap(socketBindings);