Subversion Repositories eFlore/Archives.cel-v1

Compare Revisions

Ignore whitespace Rev 26 → Rev 25

/trunk/src/org/tela_botanica/client/Mediator.java
12,10 → 12,9
import com.google.gwt.json.client.JSONValue;
import com.google.gwt.user.client.HTTPRequest;
import com.google.gwt.user.client.ResponseTextHandler;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.TextBox;
 
public class Mediator implements AutoCompleteAsyncTextBoxListener {
public class Mediator {
private String serviceBaseUrl = getServiceBaseUrlFromDictionnary();
45,6 → 44,7
Mediator() {
}
/**
53,7 → 53,8
*/
public void initUser() {
getUserFromService(); // Appel distant recherche de l'utilisateur
getUserFromService();
}
73,48 → 74,7
}
 
/**
* Action lancee par la completion d'un nom dans l'assistant de saisie
* Recherche d'information compl�mentaires ....
*
* @return void
*/
public void onComplete(ResponseTextHandler sender, String str, String value) {
if (sender instanceof NameAssistant) {
onNameCompleted(value);
}
 
}
 
/**
* Action lancee par la selection d'un nom dans l'assistant de saisie. Lance
* la recherche d'informations compl�mentaires (famille, numero
* nomenclaturaux etc) et met a jour l'inventaire (addelement())
*
* @return void
*/
public void onValidate(SourcesAutoCompleteAsyncTextBoxEvents sender,
String str, String value) {
if (getEntryPanel().getOrdre()==null) {
onAddInventoryItem();
}
else {
onModifyInventoryItem(getEntryPanel().getOrdre());
getEntryPanel().setOrdre(null);
}
 
}
 
/**
* Action suite ajout, modification, suppression element inventaire
*/
144,19 → 104,6
 
/**
* Action sur deselection d'une observation : affichage du detail
*/
public void onInventoryItemUnselected(String ordre) {
entryPanel.setOrdre(null);
}
 
 
 
/**
* Action sur recherche : affichage de la liste des taxons correspondants
*/
180,19 → 127,20
public void onLocationSelected(String loc) {
inventoryItemList.setLocation(loc);
// inventoryItemList.setDate("all");
// inventoryItemList.setStation("all");
inventoryItemList.updateCount();
inventoryItemList.displayFilter();
// nameAssistant.setValue(null);
 
dateList.setLocation(loc);
// dateList.setDate("all");
dateList.updateCount();
stationList.setLocation(loc);
// stationList.setStation("all");
stationList.updateCount();
}
/**
* Action sur login
242,9 → 190,6
 
inventoryItemList.setStation(station);
inventoryItemList.updateCount();
inventoryItemList.displayFilter();
 
// nameAssistant.setValue(null);
 
 
261,9 → 206,6
 
inventoryItemList.setDate(date);
inventoryItemList.updateCount();
inventoryItemList.displayFilter();
 
// nameAssistant.setValue(null);
 
 
270,20 → 212,17
}
 
/**
* Action suivant la completion d'un nom
* Action suivant la complétion d'un nom
*
*/
 
public void onNameCompleted(String value) {
if (infoPopup==null) {
infoPopup = new InfoPopup(this);
}
infoPopup.setImageUrl(value);
}
/**
* Action prealable a l'ajout d'une observation : controle presence champs requis et lancement mise a jour
* Action prealable à l'ajout d'une observation : controle presence champs requis et lancement mise a jour
*
*/
297,7 → 236,7
 
/**
* Action prealable a la modification d'une observation : controle presence champs requis et lancement mise a jour
* Action prealable à la modification d'une observation : controle presence champs requis et lancement mise a jour
*
*/
 
490,7 → 429,7
 
/**
* Recherche distante et asynchrone de l'utilisateur connecte, en retour lancement methode initialisation
* Recherche distante et asynchrone de l'utilisateur connecté, en retour lancement methode initialisation
* de l'appellant Cel. (initAsync)
*
*/
505,8 → 444,8
JSONValue jsonValue = JSONParser.parse(str);
JSONArray jsonArray;
if ((jsonArray = jsonValue.isArray()) != null) {
user = ((JSONString) jsonArray.get(0)).stringValue(); // Identifiant utilisateur ou identifiant de session si non connecte
connected = ((JSONBoolean) jsonArray.get(1)).booleanValue(); // Drapeau leve si utilisateur identifie
user = ((JSONString) jsonArray.get(0)).stringValue();
connected = ((JSONBoolean) jsonArray.get(1)).booleanValue();
}
cel.initAsync();
}
541,7 → 480,7
 
/**
* Accesseur Utilisateur
* @return utilisateur connecte ou identifiant de session
* @return utilisateur connecté ou identifiant de session
*/
public String getUser() {
591,9 → 530,6
}
 
public InfoPopup getInfoPopup() {
if (infoPopup==null) {
infoPopup = new InfoPopup(this);
}
return infoPopup;
}