Create an RPCSuggestOracle proxy and use it.
The RPCSuggestOracle class will proxy SuggestOracle requests to another SuggestOracle while keeping track of the latest request. Any response that belongs to a request which is not the latest request will be dropped to prevent invalid deliveries. Use this class ontop of the AccountSugestOracle, the AccountGroupSuggestOracle, and the ProjectNameSuggestOracle. Bug: issue 607 Change-Id: I33b2419cec5a8e9878c2eedb227b402bb9897455
This commit is contained in:
@@ -17,6 +17,7 @@ package com.google.gerrit.client.ui;
|
||||
import com.google.gerrit.client.Gerrit;
|
||||
import com.google.gerrit.client.admin.Util;
|
||||
import com.google.gerrit.client.ui.HintTextBox;
|
||||
import com.google.gerrit.client.ui.RPCSuggestOracle;
|
||||
import com.google.gwt.event.dom.client.ClickEvent;
|
||||
import com.google.gwt.event.dom.client.ClickHandler;
|
||||
import com.google.gwt.event.dom.client.KeyCodes;
|
||||
@@ -41,7 +42,8 @@ public class AddMemberBox extends Composite {
|
||||
addPanel = new FlowPanel();
|
||||
addMember = new Button(Util.C.buttonAddGroupMember());
|
||||
nameTxtBox = new HintTextBox();
|
||||
nameTxt = new SuggestBox(new AccountSuggestOracle(), nameTxtBox);
|
||||
nameTxt = new SuggestBox(new RPCSuggestOracle(
|
||||
new AccountSuggestOracle()), nameTxtBox);
|
||||
|
||||
nameTxtBox.setVisibleLength(50);
|
||||
nameTxtBox.setHintText(Util.C.defaultAccountName());
|
||||
|
||||
Reference in New Issue
Block a user