Revision 46460
Added by Panagiotis Kanakakis over 7 years ago
AutoCompleteWidget.java | ||
---|---|---|
12 | 12 |
import com.google.gwt.user.client.ui.Label; |
13 | 13 |
import com.google.gwt.user.client.ui.Widget; |
14 | 14 |
import com.sencha.gxt.widget.core.client.info.Info; |
15 |
import eu.dnetlib.goldoa.domain.Request; |
|
16 |
import eu.dnetlib.goldoa.domain.RequestSort; |
|
17 |
import eu.dnetlib.goldoa.domain.RequestSortOrder; |
|
18 |
import eu.dnetlib.goldoa.domain.Vocabulary; |
|
15 |
import eu.dnetlib.goldoa.domain.*; |
|
16 |
import eu.dnetlib.goldoa.service.SearchManager; |
|
19 | 17 |
|
20 | 18 |
import java.util.List; |
21 | 19 |
|
... | ... | |
156 | 154 |
this.autoCompleteListener = autoCompleteListener; |
157 | 155 |
} |
158 | 156 |
|
159 |
private void createSuggestionList(String type, String matchString) { |
|
157 |
private void createSuggestionList(final String type, String matchString) {
|
|
160 | 158 |
|
161 | 159 |
autoCompleteVocabularyService.getAutoCompleteVocabulary(type, matchString, new AsyncCallback<List<Vocabulary>>() { |
162 | 160 |
|
163 | 161 |
@Override |
164 | 162 |
public void onFailure(Throwable caught) { |
165 |
Window.alert("Suggestion list error!"); |
|
163 |
|
|
164 |
//Window.alert("Suggestion list error!"); |
|
166 | 165 |
} |
167 | 166 |
|
168 | 167 |
@Override |
... | ... | |
171 | 170 |
FlowPanel suggestionList = new FlowPanel(); |
172 | 171 |
|
173 | 172 |
if (!vocabularyList.isEmpty()) { |
174 |
for (final Vocabulary vocabulary : vocabularyList) {
|
|
173 |
for (final Vocabulary vocabulary:vocabularyList) {
|
|
175 | 174 |
|
176 | 175 |
Anchor anchor = new Anchor(); |
177 | 176 |
anchor.setText(vocabulary.getName()); |
Also available in: Unified diff