mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-16 07:10:48 +00:00
Merge branch 'bug3294' into bug3305
This commit is contained in:
commit
be24c47f45
2 files changed
+15
-1
No files matched your search
+1
-1
@@ -40,7 +40,7 @@ public class CreateDefaultRegattaLeaderboardDialog extends AbstractCancelableDia
|
||||
|
||||
protected void ok() {
|
||||
RegattaIdentifier regattaIdentifier = new RegattaName(regatta.getName());
|
||||
sailingService.createRegattaLeaderboard(regattaIdentifier, regatta.getName(), new int[]{},
|
||||
sailingService.createRegattaLeaderboard(regattaIdentifier, /* displayName */ null, new int[]{},
|
||||
new AsyncCallback<StrippedLeaderboardDTO>() {
|
||||
@Override
|
||||
public void onFailure(Throwable t) {
|
||||
|
||||
@@ -12,6 +12,8 @@ import com.google.gwt.event.dom.client.ChangeEvent;
|
||||
import com.google.gwt.event.dom.client.ChangeHandler;
|
||||
import com.google.gwt.event.dom.client.ClickEvent;
|
||||
import com.google.gwt.event.dom.client.ClickHandler;
|
||||
import com.google.gwt.event.dom.client.KeyUpEvent;
|
||||
import com.google.gwt.event.dom.client.KeyUpHandler;
|
||||
import com.google.gwt.event.logical.shared.ValueChangeEvent;
|
||||
import com.google.gwt.event.logical.shared.ValueChangeHandler;
|
||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
@@ -175,12 +177,24 @@ public abstract class DataEntryDialog<T> {
|
||||
oracle.addAll(suggestValuesAsCollection);
|
||||
oracle.setDefaultSuggestionsFromText(suggestValuesAsCollection);
|
||||
final SuggestBox result = new SuggestBox(oracle);
|
||||
result.getValueBox().addValueChangeHandler(new ValueChangeHandler<String>() {
|
||||
@Override
|
||||
public void onValueChange(ValueChangeEvent<String> event) {
|
||||
validate();
|
||||
}
|
||||
});
|
||||
result.getValueBox().addChangeHandler(new ChangeHandler() {
|
||||
@Override
|
||||
public void onChange(ChangeEvent event) {
|
||||
validate();
|
||||
}
|
||||
});
|
||||
result.getValueBox().addKeyUpHandler(new KeyUpHandler() {
|
||||
@Override
|
||||
public void onKeyUp(KeyUpEvent event) {
|
||||
validate();
|
||||
}
|
||||
});
|
||||
DialogUtils.linkEnterToButton(getOkButton(), result.getValueBox());
|
||||
DialogUtils.linkEscapeToButton(getCancelButton(), result.getValueBox());
|
||||
return result;
|
||||
|
||||
Reference in new issue
Block a user