| Line 1... |
Line 1... |
| 1 |
package org.tela_botanica.client.vues;
|
1 |
package org.tela_botanica.client.vues;
|
| Line -... |
Line 2... |
| - |
|
2 |
|
| 2 |
|
3 |
import org.tela_botanica.client.Mediateur;
|
| 3 |
import org.tela_botanica.client.RegistreId;
|
4 |
import org.tela_botanica.client.RegistreId;
|
| - |
|
5 |
import org.tela_botanica.client.interfaces.Rafraichissable;
|
| 4 |
import org.tela_botanica.client.interfaces.Rafraichissable;
|
6 |
import org.tela_botanica.client.modeles.Information;
|
| 5 |
import org.tela_botanica.client.modeles.PersonneListe;
|
- |
|
| Line 6... |
Line 7... |
| 6 |
import org.tela_botanica.client.modeles.StructureListe;
|
7 |
import org.tela_botanica.client.modeles.PersonneListe;
|
| 7 |
|
8 |
|
| 8 |
import com.extjs.gxt.ui.client.Registry;
|
9 |
import com.extjs.gxt.ui.client.Registry;
|
| - |
|
10 |
import com.extjs.gxt.ui.client.Style.LayoutRegion;
|
| 9 |
import com.extjs.gxt.ui.client.Style.LayoutRegion;
|
11 |
import com.extjs.gxt.ui.client.util.Margins;
|
| 10 |
import com.extjs.gxt.ui.client.util.Margins;
|
12 |
import com.extjs.gxt.ui.client.widget.Info;
|
| 11 |
import com.extjs.gxt.ui.client.widget.LayoutContainer;
|
13 |
import com.extjs.gxt.ui.client.widget.LayoutContainer;
|
| 12 |
import com.extjs.gxt.ui.client.widget.layout.BorderLayout;
|
14 |
import com.extjs.gxt.ui.client.widget.layout.BorderLayout;
|
| Line 13... |
Line 15... |
| 13 |
import com.extjs.gxt.ui.client.widget.layout.BorderLayoutData;
|
15 |
import com.extjs.gxt.ui.client.widget.layout.BorderLayoutData;
|
| Line 14... |
Line 16... |
| 14 |
import com.google.gwt.user.client.Window;
|
16 |
import com.google.gwt.core.client.GWT;
|
| 15 |
|
17 |
|
| Line 34... |
Line 36... |
| 34 |
}
|
36 |
}
|
| Line 35... |
Line 37... |
| 35 |
|
37 |
|
| 36 |
public void rafraichir(Object nouvelleDonnees) {
|
38 |
public void rafraichir(Object nouvelleDonnees) {
|
| 37 |
if (nouvelleDonnees instanceof PersonneListe) {
|
39 |
if (nouvelleDonnees instanceof PersonneListe) {
|
| - |
|
40 |
remplirListe((PersonneListe) nouvelleDonnees);
|
| - |
|
41 |
} else if (nouvelleDonnees instanceof Information) {
|
| - |
|
42 |
Information info = (Information) nouvelleDonnees;
|
| - |
|
43 |
// Affichage des éventuels messages de déboguage ou d'alerte
|
| - |
|
44 |
if (info.getMessages() != null && !info.getMessages().toString().equals("[]")) {
|
| - |
|
45 |
GWT.log(info.getMessages().toString(), null);
|
| - |
|
46 |
}
|
| - |
|
47 |
// Traitement en fonction des types d'information
|
| - |
|
48 |
if (info.getType().equals("liste_personne")) {
|
| - |
|
49 |
((Mediateur) Registry.get(RegistreId.MEDIATEUR)).afficherListePersonnes((PersonneListe) info.getDonnee(0));
|
| - |
|
50 |
Info.display("Chargement d'une liste de personnes", "");
|
| 38 |
remplirListe((PersonneListe) nouvelleDonnees);
|
51 |
}
|
| 39 |
} else {
|
52 |
} else {
|
| 40 |
Window.alert("Problème!");
|
53 |
GWT.log("Pas de correspondance dans la méthode rafraichir() de la classe "+this.getClass(), null);
|
| 41 |
}
|
54 |
}
|
| Line 42... |
Line 55... |
| 42 |
}
|
55 |
}
|