1,8 → 1,10 |
package org.tela_botanica.del.client.composants.moteurrecherche; |
|
import org.tela_botanica.del.client.cache.CacheClient; |
import org.tela_botanica.del.client.composants.formulaires.AutoCompletionComboBoxPresenteur; |
import org.tela_botanica.del.client.composants.presenteur.Presenteur; |
import org.tela_botanica.del.client.modeles.InformationsRecherche; |
import org.tela_botanica.del.client.services.UtilitairesAutoCompletionService; |
|
import com.google.gwt.event.dom.client.ClickEvent; |
import com.google.gwt.event.dom.client.ClickHandler; |
11,6 → 13,10 |
import com.google.gwt.event.dom.client.KeyCodes; |
import com.google.gwt.event.dom.client.KeyPressEvent; |
import com.google.gwt.event.dom.client.KeyPressHandler; |
import com.google.gwt.http.client.Response; |
import com.google.gwt.json.client.JSONArray; |
import com.google.gwt.json.client.JSONParser; |
import com.google.gwt.json.client.JSONValue; |
import com.google.gwt.user.client.ui.HasText; |
import com.google.gwt.user.client.ui.HasWidgets; |
import com.google.gwt.user.client.ui.IsWidget; |
43,7 → 49,7 |
|
public HasText getCommune(); |
|
public HasText getTaxon(); |
public HasWidgets getTaxon(); |
|
public HasText getFamille(); |
|
62,11 → 68,29 |
|
private final Vue vue; |
private final boolean pourRechercheImages, pourRechercheObservations; |
|
private AutoCompletionComboBoxPresenteur autoCompletionNomTaxonsPresenteur; |
|
public MoteurRecherchePresenteur(Vue vue, boolean pourRechercheImages, boolean pourRechercheObservations) { |
this.vue = vue; |
this.pourRechercheImages = pourRechercheImages; |
this.pourRechercheObservations = pourRechercheObservations; |
|
autoCompletionNomTaxonsPresenteur = new AutoCompletionComboBoxPresenteur(UtilitairesAutoCompletionService.urlServiceCompletionNomLocale) { |
|
protected String effectuerPreTraitementChaineRequete(String requete) { |
return UtilitairesAutoCompletionService.effectuerPreTraitementChaineRequeteGenreEspeceSlash(requete); |
// A décommenter lors de l'utilisation des web services eflore |
//return RetourAutoCompletionService.effectuerPreTraitementChaineRequeteGenreEspeceEflore(requete); |
} |
|
@Override |
protected String[] parserResultatRequete(Response response) { |
return UtilitairesAutoCompletionService.parserRetourSimple(response); |
// A décommenter lors de l'utilisation des web services eflore |
//return RetourAutoCompletionService.parserRetourOss(response); |
} |
}; |
gererEvenements(); |
} |
|
73,6 → 97,7 |
@Override |
public void go(HasWidgets composite) { |
afficherRequeteEtLancerRecherche(); |
autoCompletionNomTaxonsPresenteur.go(vue.getTaxon()); |
composite.add(vue.asWidget()); |
} |
|