| Line 6... |
Line 6... |
| 6 |
import java.util.List;
|
6 |
import java.util.List;
|
| Line 7... |
Line 7... |
| 7 |
|
7 |
|
| 8 |
import org.tela_botanica.client.ComposantClass;
|
8 |
import org.tela_botanica.client.ComposantClass;
|
| 9 |
import org.tela_botanica.client.Mediateur;
|
9 |
import org.tela_botanica.client.Mediateur;
|
| - |
|
10 |
import org.tela_botanica.client.RegistreId;
|
| 10 |
import org.tela_botanica.client.RegistreId;
|
11 |
import org.tela_botanica.client.composants.ChampComboBoxRechercheTempsReelPaginable;
|
| - |
|
12 |
import org.tela_botanica.client.composants.InfoLogger;
|
| - |
|
13 |
import org.tela_botanica.client.composants.pagination.ProxyProjets;
|
| 11 |
import org.tela_botanica.client.composants.InfoLogger;
|
14 |
import org.tela_botanica.client.composants.pagination.ProxyValeur;
|
| 12 |
import org.tela_botanica.client.images.Images;
|
15 |
import org.tela_botanica.client.images.Images;
|
| 13 |
import org.tela_botanica.client.interfaces.Rafraichissable;
|
16 |
import org.tela_botanica.client.interfaces.Rafraichissable;
|
| 14 |
import org.tela_botanica.client.modeles.Information;
|
17 |
import org.tela_botanica.client.modeles.Information;
|
| 15 |
import org.tela_botanica.client.modeles.InterneValeur;
|
18 |
import org.tela_botanica.client.modeles.InterneValeur;
|
| Line 34... |
Line 37... |
| 34 |
import org.tela_botanica.client.util.UtilArray;
|
37 |
import org.tela_botanica.client.util.UtilArray;
|
| 35 |
import org.tela_botanica.client.util.UtilString;
|
38 |
import org.tela_botanica.client.util.UtilString;
|
| 36 |
import org.tela_botanica.client.vues.Formulaire;
|
39 |
import org.tela_botanica.client.vues.Formulaire;
|
| Line 37... |
Line 40... |
| 37 |
|
40 |
|
| - |
|
41 |
import com.extjs.gxt.ui.client.Style.Scroll;
|
| - |
|
42 |
import com.extjs.gxt.ui.client.data.ModelData;
|
| 38 |
import com.extjs.gxt.ui.client.Style.Scroll;
|
43 |
import com.extjs.gxt.ui.client.data.ModelType;
|
| 39 |
import com.extjs.gxt.ui.client.event.Events;
|
44 |
import com.extjs.gxt.ui.client.event.Events;
|
| 40 |
import com.extjs.gxt.ui.client.Registry;
|
45 |
import com.extjs.gxt.ui.client.Registry;
|
| 41 |
import com.extjs.gxt.ui.client.event.BaseEvent;
|
46 |
import com.extjs.gxt.ui.client.event.BaseEvent;
|
| 42 |
import com.extjs.gxt.ui.client.event.ButtonEvent;
|
47 |
import com.extjs.gxt.ui.client.event.ButtonEvent;
|
| Line 71... |
Line 76... |
| 71 |
import com.extjs.gxt.ui.client.widget.form.NumberField;
|
76 |
import com.extjs.gxt.ui.client.widget.form.NumberField;
|
| 72 |
import com.extjs.gxt.ui.client.widget.form.Radio;
|
77 |
import com.extjs.gxt.ui.client.widget.form.Radio;
|
| 73 |
import com.extjs.gxt.ui.client.widget.form.RadioGroup;
|
78 |
import com.extjs.gxt.ui.client.widget.form.RadioGroup;
|
| 74 |
import com.extjs.gxt.ui.client.widget.form.TextArea;
|
79 |
import com.extjs.gxt.ui.client.widget.form.TextArea;
|
| 75 |
import com.extjs.gxt.ui.client.widget.form.TextField;
|
80 |
import com.extjs.gxt.ui.client.widget.form.TextField;
|
| - |
|
81 |
import com.extjs.gxt.ui.client.widget.form.Validator;
|
| 76 |
import com.extjs.gxt.ui.client.widget.form.ComboBox.TriggerAction;
|
82 |
import com.extjs.gxt.ui.client.widget.form.ComboBox.TriggerAction;
|
| 77 |
import com.extjs.gxt.ui.client.widget.form.FormPanel.LabelAlign;
|
83 |
import com.extjs.gxt.ui.client.widget.form.FormPanel.LabelAlign;
|
| 78 |
import com.extjs.gxt.ui.client.widget.grid.CellEditor;
|
84 |
import com.extjs.gxt.ui.client.widget.grid.CellEditor;
|
| 79 |
import com.extjs.gxt.ui.client.widget.grid.CheckColumnConfig;
|
85 |
import com.extjs.gxt.ui.client.widget.grid.CheckColumnConfig;
|
| 80 |
import com.extjs.gxt.ui.client.widget.grid.ColumnConfig;
|
86 |
import com.extjs.gxt.ui.client.widget.grid.ColumnConfig;
|
| Line 130... |
Line 136... |
| 130 |
private TextField<String> cpChp = null;
|
136 |
private TextField<String> cpChp = null;
|
| 131 |
private TextField<String> villeChp = null;
|
137 |
private TextField<String> villeChp = null;
|
| 132 |
private ListStore<Valeur> magazinRegion = null;
|
138 |
private ListStore<Valeur> magazinRegion = null;
|
| 133 |
private ComboBox<Valeur> comboRegion = null;
|
139 |
private ComboBox<Valeur> comboRegion = null;
|
| 134 |
private ListStore<Valeur> magazinPays = null;
|
140 |
private ListStore<Valeur> magazinPays = null;
|
| 135 |
private ComboBox<Valeur> comboPays = null;
|
141 |
private ChampComboBoxRechercheTempsReelPaginable comboPays = null;
|
| 136 |
private TextField<String> latitudeChp = null;
|
142 |
private TextField<String> latitudeChp = null;
|
| 137 |
private TextField<String> longitudeChp = null;
|
143 |
private TextField<String> longitudeChp = null;
|
| 138 |
private TextField<String> telChp = null;
|
144 |
private TextField<String> telChp = null;
|
| 139 |
private TextField<String> faxChp = null;
|
145 |
private TextField<String> faxChp = null;
|
| 140 |
private TextField<String> emailChp = null;
|
146 |
private TextField<String> emailChp = null;
|
| Line 217... |
Line 223... |
| 217 |
private LayoutContainer materielConservationCp = null;
|
223 |
private LayoutContainer materielConservationCp = null;
|
| 218 |
private ListStore<Personne> personneExistanteMagazin = null;
|
224 |
private ListStore<Personne> personneExistanteMagazin = null;
|
| 219 |
private ComboBox<Personne> personneExistanteCombo = null;
|
225 |
private ComboBox<Personne> personneExistanteCombo = null;
|
| 220 |
private Button supprimerPersonnelBtn = null;
|
226 |
private Button supprimerPersonnelBtn = null;
|
| 221 |
private ListStore<Projet> projetsMagazin = null;
|
227 |
private ListStore<Projet> projetsMagazin = null;
|
| 222 |
private ComboBox<Projet> projetsCombo = null;
|
228 |
private ChampComboBoxRechercheTempsReelPaginable projetsCombo = null;
|
| 223 |
private CellEditor fonctionEditor = null;
|
229 |
private CellEditor fonctionEditor = null;
|
| 224 |
private List<Valeur> fonctionsListe = null;
|
230 |
private List<Valeur> fonctionsListe = null;
|
| Line 225... |
Line 231... |
| 225 |
|
231 |
|
| Line 327... |
Line 333... |
| 327 |
(identificationOnglet.getData("acces").equals(false) && identification.getNom().equals(""))) {
|
333 |
(identificationOnglet.getData("acces").equals(false) && identification.getNom().equals(""))) {
|
| 328 |
messages.add("Veuillez indiquez un nom à l'institution.");
|
334 |
messages.add("Veuillez indiquez un nom à l'institution.");
|
| 329 |
}
|
335 |
}
|
| Line 330... |
Line 336... |
| 330 |
|
336 |
|
| 331 |
// Vérification des infos sur le projet de la structure
|
337 |
// Vérification des infos sur le projet de la structure
|
| 332 |
if ( (identificationOnglet.getData("acces").equals(true) && projetsCombo.getValue() == null) ||
|
338 |
if ( (identificationOnglet.getData("acces").equals(true) && projetsCombo.getCombo().getValue() == null) ||
|
| 333 |
(identificationOnglet.getData("acces").equals(true) && projetsCombo.getValue().equals("")) ||
|
339 |
(identificationOnglet.getData("acces").equals(true) && projetsCombo.getCombo().getValue().equals("")) ||
|
| 334 |
(identificationOnglet.getData("acces").equals(false) && identification.getIdProjet().equals(""))) {
|
340 |
(identificationOnglet.getData("acces").equals(false) && identification.getIdProjet().equals(""))) {
|
| 335 |
messages.add("Veuillez sélectionner un projet pour l'institution.");
|
341 |
messages.add("Veuillez sélectionner un projet pour l'institution.");
|
| Line 336... |
Line 342... |
| 336 |
}
|
342 |
}
|
| Line 652... |
Line 658... |
| 652 |
Structure structureCollectee = (Structure) identification.cloner(new Structure());
|
658 |
Structure structureCollectee = (Structure) identification.cloner(new Structure());
|
| Line 653... |
Line 659... |
| 653 |
|
659 |
|
| 654 |
structureCollectee.setId(idStructureChp.getValue());
|
660 |
structureCollectee.setId(idStructureChp.getValue());
|
| 655 |
structureCollectee.setNom(nomStructureChp.getValue());
|
661 |
structureCollectee.setNom(nomStructureChp.getValue());
|
| 656 |
// Récupération de l'identifiant du projet
|
662 |
// Récupération de l'identifiant du projet
|
| 657 |
if (projetsCombo.getValue() != null) {
|
663 |
if (projetsCombo.getCombo().getValue() != null) {
|
| 658 |
structureCollectee.setIdProjet(projetsCombo.getValue().getId());
|
664 |
structureCollectee.setIdProjet(new Projet(projetsCombo.getValeur()).getId());
|
| 659 |
}
|
665 |
}
|
| 660 |
// Récupération de l'acronyme (= identifiant alternatif)
|
666 |
// Récupération de l'acronyme (= identifiant alternatif)
|
| 661 |
structureCollectee.setIdAlternatif(null);
|
667 |
structureCollectee.setIdAlternatif(null);
|
| 662 |
if (comboAcronyme.getValue() != null) {
|
668 |
if (comboAcronyme.getValue() != null) {
|
| Line 706... |
Line 712... |
| 706 |
strRegion = valeurRegion.getId();
|
712 |
strRegion = valeurRegion.getId();
|
| 707 |
}
|
713 |
}
|
| Line 708... |
Line 714... |
| 708 |
|
714 |
|
| 709 |
structureCollectee.setRegion(strRegion);
|
715 |
structureCollectee.setRegion(strRegion);
|
| 710 |
structureCollectee.setPays(null);
|
716 |
structureCollectee.setPays(null);
|
| 711 |
if (comboPays.getValue() != null) {
|
717 |
if (comboPays.getCombo().getValue() != null) {
|
| 712 |
structureCollectee.setPays(comboPays.getValue().getId());
|
718 |
structureCollectee.setPays(new Valeur(comboPays.getValeur()).getId());
|
| 713 |
} else if (comboPays.getRawValue() != "") {
|
719 |
} else if (comboPays.getCombo().getRawValue() != "") {
|
| 714 |
structureCollectee.setPays(comboPays.getRawValue());
|
720 |
structureCollectee.setPays(comboPays.getCombo().getRawValue());
|
| 715 |
}
|
721 |
}
|
| 716 |
structureCollectee.setLatitude(latitudeChp.getValue());
|
722 |
structureCollectee.setLatitude(latitudeChp.getValue());
|
| Line 717... |
Line 723... |
| 717 |
structureCollectee.setLongitude(longitudeChp.getValue());
|
723 |
structureCollectee.setLongitude(longitudeChp.getValue());
|
| Line 741... |
Line 747... |
| 741 |
// Initialisation de l'objet Structure
|
747 |
// Initialisation de l'objet Structure
|
| 742 |
identification = new Structure();
|
748 |
identification = new Structure();
|
| 743 |
// Indication du projet sélectionné par défaut
|
749 |
// Indication du projet sélectionné par défaut
|
| 744 |
String projetCourantId = ((Mediateur) Registry.get(RegistreId.MEDIATEUR)).getProjetId();
|
750 |
String projetCourantId = ((Mediateur) Registry.get(RegistreId.MEDIATEUR)).getProjetId();
|
| 745 |
if (projetCourantId != null && !projetCourantId.equals("0")) {
|
751 |
if (projetCourantId != null && !projetCourantId.equals("0")) {
|
| 746 |
projetsCombo.setValue(projetsCombo.getStore().findModel("id_projet", projetCourantId));
|
752 |
projetsCombo.getCombo().setValue(projetsCombo.getStore().findModel("cpr_id_projet", projetCourantId));
|
| 747 |
}
|
753 |
}
|
| 748 |
}
|
754 |
}
|
| 749 |
if (mode.equals(MODE_MODIFIER) && identification != null && identificationOnglet.getData("acces").equals(false)) {
|
755 |
if (mode.equals(MODE_MODIFIER) && identification != null && identificationOnglet.getData("acces").equals(false)) {
|
| 750 |
idStructureChp.setValue(identification.getId());
|
756 |
idStructureChp.setValue(identification.getId());
|
| 751 |
nomStructureChp.setValue(identification.getNom());
|
757 |
nomStructureChp.setValue(identification.getNom());
|
| 752 |
if (!identification.getIdProjet().equals("0")) {
|
758 |
if (!identification.getIdProjet().equals("0")) {
|
| 753 |
projetsCombo.setValue(projetsCombo.getStore().findModel("id_projet", identification.getIdProjet()));
|
759 |
projetsCombo.getCombo().setValue(projetsCombo.getStore().findModel("cpr_id_projet", identification.getIdProjet()));
|
| 754 |
}
|
760 |
}
|
| Line 755... |
Line 761... |
| 755 |
|
761 |
|
| 756 |
if (!identification.getIdAlternatif().isEmpty()) {
|
762 |
if (!identification.getIdAlternatif().isEmpty()) {
|
| 757 |
String[] acronyme = identification.getIdAlternatif().split("##");
|
763 |
String[] acronyme = identification.getIdAlternatif().split("##");
|
| Line 799... |
Line 805... |
| 799 |
cpChp.setValue(identification.getCodePostal());
|
805 |
cpChp.setValue(identification.getCodePostal());
|
| 800 |
villeChp.setValue(identification.getVille());
|
806 |
villeChp.setValue(identification.getVille());
|
| 801 |
mettreAJourRegion();
|
807 |
mettreAJourRegion();
|
| 802 |
//(identification.getRegion());
|
808 |
//(identification.getRegion());
|
| 803 |
if (identification.getPays().matches("^[0-9]+$")) {
|
809 |
if (identification.getPays().matches("^[0-9]+$")) {
|
| 804 |
comboPays.setValue(comboPays.getStore().findModel("id_valeur", identification.getPays()));
|
810 |
comboPays.getCombo().setValue(comboPays.getStore().findModel("cmlv_id_valeur", identification.getPays()));
|
| 805 |
} else {
|
811 |
} else {
|
| 806 |
comboPays.setRawValue(identification.getPays());
|
812 |
comboPays.getCombo().setRawValue(identification.getPays());
|
| 807 |
}
|
813 |
}
|
| 808 |
latitudeChp.setValue(identification.getLatitude());
|
814 |
latitudeChp.setValue(identification.getLatitude());
|
| 809 |
longitudeChp.setValue(identification.getLongitude());
|
815 |
longitudeChp.setValue(identification.getLongitude());
|
| Line 810... |
Line 816... |
| 810 |
|
816 |
|
| Line 1080... |
Line 1086... |
| 1080 |
if (mode.equals("MODIF")) {
|
1086 |
if (mode.equals("MODIF")) {
|
| 1081 |
personne.setIdStructure(identification.getId());
|
1087 |
personne.setIdStructure(identification.getId());
|
| 1082 |
}
|
1088 |
}
|
| Line 1083... |
Line 1089... |
| 1083 |
|
1089 |
|
| 1084 |
// Récupération de l'id du projet de la structure qui servira aussi pour les Personnes crées dans ce formulaire
|
1090 |
// Récupération de l'id du projet de la structure qui servira aussi pour les Personnes crées dans ce formulaire
|
| 1085 |
if (personne.getIdPersonne().equals("") && projetsCombo.getValue() != null) {
|
1091 |
if (personne.getIdPersonne().equals("") && projetsCombo.getCombo().getValue() != null) {
|
| 1086 |
personne.setIdProjetPersonne(projetsCombo.getValue().getId());
|
1092 |
personne.setIdProjetPersonne(new Projet(projetsCombo.getValeur()).getId());
|
| Line 1087... |
Line 1093... |
| 1087 |
}
|
1093 |
}
|
| 1088 |
|
1094 |
|
| 1089 |
// Gestion de la fonction
|
1095 |
// Gestion de la fonction
|
| Line 1139... |
Line 1145... |
| 1139 |
|
1145 |
|
| 1140 |
// Gestion de la spécialité
|
1146 |
// Gestion de la spécialité
|
| 1141 |
String specialite = personne.get("specialite");
|
1147 |
String specialite = personne.get("specialite");
|
| Line -... |
Line 1148... |
| - |
|
1148 |
personne.setSpecialite(specialite);
|
| - |
|
1149 |
|
| - |
|
1150 |
// On met à faux le décès
|
| 1142 |
personne.setSpecialite(specialite);
|
1151 |
personne.setDeces(Personne.ETRE_VIVANT);
|
| 1143 |
|
1152 |
|
| 1144 |
// Ajout de la personne dans la liste correspondant à son état (ajouté ou modifié)
|
1153 |
// Ajout de la personne dans la liste correspondant à son état (ajouté ou modifié)
|
| 1145 |
if (personne.get("etat") != null && personne.get("etat").equals(StructureAPersonne.ETAT_AJOUTE)) {// Une personne ajoutée
|
1154 |
if (personne.get("etat") != null && personne.get("etat").equals(StructureAPersonne.ETAT_AJOUTE)) { // Une personne ajoutée
|
| 1146 |
personnelAjoute.put(""+i, personne);
|
1155 |
personnelAjoute.put(""+i, personne);
|
| 1147 |
} else {// Une personne modifiée
|
1156 |
} else {// Une personne modifiée
|
| 1148 |
personnelModifie.put(personne.getId(), personne);
|
1157 |
personnelModifie.put(personne.getId(), personne);
|
| Line 1379... |
Line 1388... |
| 1379 |
};
|
1388 |
};
|
| 1380 |
column = new ColumnConfig("statut", "Statut", 100);
|
1389 |
column = new ColumnConfig("statut", "Statut", 100);
|
| 1381 |
column.setEditor(statutEditor);
|
1390 |
column.setEditor(statutEditor);
|
| 1382 |
configs.add(column);
|
1391 |
configs.add(column);
|
| Line 1383... |
Line 1392... |
| 1383 |
|
1392 |
|
| 1384 |
column = new ColumnConfig("travail", "Temps travail", 100);
|
1393 |
column = new ColumnConfig("travail", "Travail hebdo (%)", 100);
|
| 1385 |
column.setNumberFormat(NumberFormat.getFormat("##"));
|
1394 |
column.setNumberFormat(NumberFormat.getFormat("##"));
|
| 1386 |
NumberField tpsWChp = new NumberField();
|
1395 |
NumberField tpsWChp = new NumberField();
|
| 1387 |
tpsWChp.setFormat(NumberFormat.getFormat("##"));
|
1396 |
tpsWChp.setFormat(NumberFormat.getFormat("##"));
|
| 1388 |
tpsWChp.setToolTip("Ce champ doit contenir un nombre");
|
1397 |
tpsWChp.setToolTip("Ce champ doit contenir un nombre");
|
| Line 1517... |
Line 1526... |
| 1517 |
public void handleEvent(StoreEvent<StructureAPersonne> ce) {
|
1526 |
public void handleEvent(StoreEvent<StructureAPersonne> ce) {
|
| Line 1518... |
Line 1527... |
| 1518 |
|
1527 |
|
| 1519 |
StructureAPersonne structureAPersonne = ce.getModel();
|
1528 |
StructureAPersonne structureAPersonne = ce.getModel();
|
| Line 1520... |
Line 1529... |
| 1520 |
String etat = structureAPersonne.get("etat");
|
1529 |
String etat = structureAPersonne.get("etat");
|
| - |
|
1530 |
|
| 1521 |
|
1531 |
if (etat!=null && !etat.equals(aDonnee.ETAT_AJOUTE) && structureAPersonne!=null && !UtilString.isEmpty(structureAPersonne.getId())) {
|
| 1522 |
if (!etat.equals(aDonnee.ETAT_AJOUTE) && !UtilString.isEmpty(structureAPersonne.getId())) {
|
1532 |
System.out.println("modifier");
|
| - |
|
1533 |
ce.getModel().set("etat", aDonnee.ETAT_MODIFIE);
|
| 1523 |
ce.getModel().set("etat", aDonnee.ETAT_MODIFIE);
|
1534 |
} else {
|
| 1524 |
} else {
|
1535 |
System.out.println("ajoute");
|
| 1525 |
}
|
1536 |
}
|
| Line 1526... |
Line 1537... |
| 1526 |
}
|
1537 |
}
|
| Line 1561... |
Line 1572... |
| 1561 |
nomStructureChp.getMessages().setBlankText("Ce champ est obligatoire.");
|
1572 |
nomStructureChp.getMessages().setBlankText("Ce champ est obligatoire.");
|
| 1562 |
nomStructureChp.addStyleName(ComposantClass.OBLIGATOIRE);
|
1573 |
nomStructureChp.addStyleName(ComposantClass.OBLIGATOIRE);
|
| 1563 |
nomStructureChp.addListener(Events.Valid, creerEcouteurChampObligatoire());
|
1574 |
nomStructureChp.addListener(Events.Valid, creerEcouteurChampObligatoire());
|
| 1564 |
fieldSetIdentite.add(nomStructureChp, new FormData(450, 0));
|
1575 |
fieldSetIdentite.add(nomStructureChp, new FormData(450, 0));
|
| Line 1565... |
Line -... |
| 1565 |
|
- |
|
| 1566 |
|
1576 |
|
| 1567 |
projetsMagazin = new ListStore<Projet>();
|
1577 |
ModelType modelTypeProjets = new ModelType();
|
| 1568 |
mediateur.selectionnerProjet(this, null, sequenceur);
|
1578 |
modelTypeProjets.setRoot("projets");
|
| 1569 |
projetsCombo = new ComboBox<Projet>();
|
1579 |
modelTypeProjets.setTotalName("nbElements");
|
| 1570 |
projetsCombo.setTabIndex(tabIndex++);
|
1580 |
modelTypeProjets.addField("cpr_nom");
|
| - |
|
1581 |
modelTypeProjets.addField("cpr_id_projet");
|
| 1571 |
projetsCombo.setFieldLabel("Projet");
|
1582 |
|
| 1572 |
projetsCombo.setLabelSeparator("");
|
1583 |
String displayNameProjets = "cpr_nom";
|
| - |
|
1584 |
ProxyProjets<ModelData> proxyProjets = new ProxyProjets<ModelData>();
|
| - |
|
1585 |
|
| 1573 |
projetsCombo.setDisplayField("nom");
|
1586 |
projetsCombo = new ChampComboBoxRechercheTempsReelPaginable(proxyProjets, modelTypeProjets, displayNameProjets);
|
| 1574 |
projetsCombo.setEditable(false);
|
1587 |
projetsCombo.getCombo().setTabIndex(tabIndex++);
|
| 1575 |
projetsCombo.setTriggerAction(TriggerAction.ALL);
|
1588 |
projetsCombo.getCombo().setFieldLabel(i18nC.projetChamp());
|
| 1576 |
projetsCombo.setStore(projetsMagazin);
|
1589 |
projetsCombo.getCombo().setForceSelection(true);
|
| 1577 |
projetsCombo.addStyleName(ComposantClass.OBLIGATOIRE);
|
1590 |
projetsCombo.getCombo().addStyleName(ComposantClass.OBLIGATOIRE);
|
| - |
|
1591 |
projetsCombo.getCombo().addListener(Events.Valid, Formulaire.creerEcouteurChampObligatoire());
|
| 1578 |
projetsCombo.addListener(Events.Valid, creerEcouteurChampObligatoire());
|
1592 |
projetsCombo.setWidth(120, 450);
|
| Line 1579... |
Line 1593... |
| 1579 |
fieldSetIdentite.add(projetsCombo, new FormData(450, 0));
|
1593 |
fieldSetIdentite.add(projetsCombo, new FormData(450, 0));
|
| 1580 |
|
1594 |
|
| 1581 |
// Création du sous-formulaire : Acronyme
|
1595 |
// Création du sous-formulaire : Acronyme
|
| Line 1748... |
Line 1762... |
| 1748 |
|
1762 |
|
| 1749 |
//+-----------------------------------------------------------------------------------------------------------+
|
1763 |
//+-----------------------------------------------------------------------------------------------------------+
|
| 1750 |
// Fieldset ADRESSE
|
1764 |
// Fieldset ADRESSE
|
| 1751 |
LayoutContainer principalFdAdresse = new LayoutContainer();
|
1765 |
LayoutContainer principalFdAdresse = new LayoutContainer();
|
| 1752 |
principalFdAdresse.setLayout(new ColumnLayout());
|
1766 |
principalFdAdresse.setLayout(new ColumnLayout());
|
| Line 1753... |
Line 1767... |
| 1753 |
principalFdAdresse.setSize(600, -1);
|
1767 |
principalFdAdresse.setSize(700, -1);
|
| 1754 |
|
1768 |
|
| Line 1755... |
Line 1769... |
| 1755 |
LayoutContainer gaucheFdAdresse = new LayoutContainer();
|
1769 |
LayoutContainer gaucheFdAdresse = new LayoutContainer();
|
| 1756 |
gaucheFdAdresse.setLayout(creerFormLayout(null, LabelAlign.LEFT));
|
1770 |
gaucheFdAdresse.setLayout(creerFormLayout(null, LabelAlign.LEFT));
|
| - |
|
1771 |
|
| Line 1757... |
Line 1772... |
| 1757 |
|
1772 |
LayoutContainer droiteFdAdresse = new LayoutContainer();
|
| 1758 |
LayoutContainer droiteFdAdresse = new LayoutContainer();
|
1773 |
droiteFdAdresse.setLayout(creerFormLayout(100, LabelAlign.LEFT));
|
| 1759 |
droiteFdAdresse.setLayout(creerFormLayout(null, LabelAlign.LEFT));
|
1774 |
droiteFdAdresse.setWidth(300);
|
| Line 1782... |
Line 1797... |
| 1782 |
villeChp = new TextField<String>();
|
1797 |
villeChp = new TextField<String>();
|
| 1783 |
villeChp.setTabIndex(tabIndex++);
|
1798 |
villeChp.setTabIndex(tabIndex++);
|
| 1784 |
villeChp.setFieldLabel("Ville");
|
1799 |
villeChp.setFieldLabel("Ville");
|
| 1785 |
gaucheFdAdresse.add(villeChp, new FormData("95%"));
|
1800 |
gaucheFdAdresse.add(villeChp, new FormData("95%"));
|
| Line 1786... |
Line 1801... |
| 1786 |
|
1801 |
|
| 1787 |
magazinPays = new ListStore<Valeur>();
|
1802 |
ModelType modelTypesPays = new ModelType();
|
| 1788 |
comboPays = new ComboBox<Valeur>();
|
1803 |
modelTypesPays.setRoot("valeurs");
|
| 1789 |
comboPays.setTabIndex(tabIndex++);
|
1804 |
modelTypesPays.setTotalName("nbElements");
|
| 1790 |
comboPays.setFieldLabel("Pays");
|
1805 |
modelTypesPays.addField("cmlv_nom");
|
| 1791 |
comboPays.setEmptyText("Sélectionner un pays...");
|
1806 |
modelTypesPays.addField("cmlv_id_valeur");
|
| 1792 |
comboPays.setEditable(true);
|
1807 |
modelTypesPays.addField("cmlv_abreviation");
|
| - |
|
1808 |
modelTypesPays.addField("cmlv_description");
|
| - |
|
1809 |
|
| - |
|
1810 |
String displayNamePays = "cmlv_nom";
|
| - |
|
1811 |
String nomListeTypes = "pays";
|
| - |
|
1812 |
ProxyValeur<ModelData> proxyPays = new ProxyValeur<ModelData>(nomListeTypes);
|
| - |
|
1813 |
|
| 1793 |
comboPays.setLabelSeparator("");
|
1814 |
comboPays = new ChampComboBoxRechercheTempsReelPaginable(proxyPays, modelTypesPays, displayNamePays);
|
| 1794 |
comboPays.setDisplayField("nom");
|
1815 |
comboPays.setWidth(100,300);
|
| 1795 |
comboPays.setTemplate(getTemplatePays());
|
1816 |
comboPays.getCombo().setTabIndex(tabIndex++);
|
| 1796 |
comboPays.setTypeAhead(true);
|
1817 |
comboPays.getCombo().setFieldLabel("Pays");
|
| 1797 |
comboPays.setTriggerAction(TriggerAction.ALL);
|
1818 |
comboPays.getCombo().setForceSelection(true);
|
| Line 1798... |
Line 1819... |
| 1798 |
comboPays.setStore(magazinPays);
|
1819 |
comboPays.getCombo().setTemplate(getTemplatePays());
|
| 1799 |
|
1820 |
|
| 1800 |
SelectionChangedListener<Valeur> selectionChange = new SelectionChangedListener<Valeur>() {
|
1821 |
SelectionChangedListener<ModelData> selectionChange = new SelectionChangedListener<ModelData>() {
|
| - |
|
1822 |
public void selectionChanged(SelectionChangedEvent se) {
|
| 1801 |
public void selectionChanged(SelectionChangedEvent se) {
|
1823 |
// Rafraichir avec le pays sélectionné
|
| 1802 |
// Rafraichir avec le pays sélectionné
|
1824 |
comboRegion.clear();
|
| 1803 |
obtenirListeRegionParPays(((Valeur) se.getSelectedItem()).getAbreviation().toString());
|
1825 |
obtenirListeRegionParPays((new Valeur(se.getSelectedItem())).getAbreviation().toString());
|
| 1804 |
}
|
- |
|
| 1805 |
};
|
1826 |
}
|
| 1806 |
|
- |
|
| Line 1807... |
Line 1827... |
| 1807 |
comboPays.addSelectionChangedListener(selectionChange);
|
1827 |
};
|
| 1808 |
|
- |
|
| Line 1809... |
Line 1828... |
| 1809 |
|
1828 |
comboPays.getCombo().addSelectionChangedListener(selectionChange);
|
| 1810 |
droiteFdAdresse.add(comboPays, new FormData("95%"));
|
1829 |
|
| 1811 |
mediateur.obtenirListeValeurEtRafraichir(this, "pays", sequenceur);
|
1830 |
droiteFdAdresse.add(comboPays, new FormData("95%"));
|
| 1812 |
|
1831 |
|
| Line 1909... |
Line 1928... |
| 1909 |
}
|
1928 |
}
|
| Line 1910... |
Line 1929... |
| 1910 |
|
1929 |
|
| 1911 |
private native String getTemplatePays() /*-{
|
1930 |
private native String getTemplatePays() /*-{
|
| 1912 |
return [
|
1931 |
return [
|
| 1913 |
'<tpl for=".">',
|
1932 |
'<tpl for=".">',
|
| 1914 |
'<div class="x-combo-list-item">{nom} ({abreviation})</div>',
|
1933 |
'<div class="x-combo-list-item">{cmlv_nom} ({cmlv_abreviation})</div>',
|
| 1915 |
'</tpl>'
|
1934 |
'</tpl>'
|
| 1916 |
].join("");
|
1935 |
].join("");
|
| Line 1917... |
Line 1936... |
| 1917 |
}-*/;
|
1936 |
}-*/;
|
| Line 2028... |
Line 2047... |
| 2028 |
Information info = (Information) nouvellesDonnees;
|
2047 |
Information info = (Information) nouvellesDonnees;
|
| 2029 |
rafraichirInformation(info);
|
2048 |
rafraichirInformation(info);
|
| 2030 |
} else if (nouvellesDonnees instanceof ValeurListe) {
|
2049 |
} else if (nouvellesDonnees instanceof ValeurListe) {
|
| 2031 |
ValeurListe listeValeurs = (ValeurListe) nouvellesDonnees;
|
2050 |
ValeurListe listeValeurs = (ValeurListe) nouvellesDonnees;
|
| 2032 |
rafraichirValeurListe(listeValeurs);
|
2051 |
rafraichirValeurListe(listeValeurs);
|
| 2033 |
} else if (nouvellesDonnees instanceof ProjetListe) {
|
- |
|
| 2034 |
ProjetListe projets = (ProjetListe) nouvellesDonnees;
|
- |
|
| 2035 |
rafraichirProjetListe(projets);
|
- |
|
| 2036 |
} else {
|
2052 |
} else {
|
| 2037 |
GWT.log(Mediateur.i18nM.erreurRafraichir(nouvellesDonnees.getClass(), this.getClass()), null);
|
2053 |
GWT.log(Mediateur.i18nM.erreurRafraichir(nouvellesDonnees.getClass(), this.getClass()), null);
|
| 2038 |
}
|
2054 |
}
|
| 2039 |
} catch (Exception e) {
|
2055 |
} catch (Exception e) {
|
| 2040 |
GWT.log(Mediateur.i18nM.erreurRafraichir(nouvellesDonnees.getClass(), this.getClass()), e);
|
2056 |
GWT.log(Mediateur.i18nM.erreurRafraichir(nouvellesDonnees.getClass(), this.getClass()), e);
|
| Line 2151... |
Line 2167... |
| 2151 |
fonctionsListe = liste;
|
2167 |
fonctionsListe = liste;
|
| 2152 |
fonctionsMagazin.removeAll();
|
2168 |
fonctionsMagazin.removeAll();
|
| 2153 |
fonctionsMagazin.add(liste);
|
2169 |
fonctionsMagazin.add(liste);
|
| 2154 |
fonctionsCombo.setStore(fonctionsMagazin);
|
2170 |
fonctionsCombo.setStore(fonctionsMagazin);
|
| 2155 |
}
|
2171 |
}
|
| 2156 |
if (listeValeurs.getId().equals(config.getListeId("pays"))) {
|
- |
|
| 2157 |
magazinPays.removeAll();
|
- |
|
| 2158 |
magazinPays.add(liste);
|
- |
|
| 2159 |
comboPays.setStore(magazinPays);
|
- |
|
| 2160 |
}
|
- |
|
| Line 2161... |
Line 2172... |
| 2161 |
|
2172 |
|
| 2162 |
if (listeValeurs.getId().equals(config.getListeId("region"))) {
|
2173 |
if (listeValeurs.getId().equals(config.getListeId("region"))) {
|
| 2163 |
magazinRegion.removeAll();
|
2174 |
magazinRegion.removeAll();
|
| 2164 |
magazinRegion.add(liste);
|
2175 |
magazinRegion.add(liste);
|
| Line 2237... |
Line 2248... |
| 2237 |
} else {
|
2248 |
} else {
|
| 2238 |
GWT.log("La liste #"+listeValeurs.getId()+" ne contient aucune valeurs!", null);
|
2249 |
GWT.log("La liste #"+listeValeurs.getId()+" ne contient aucune valeurs!", null);
|
| 2239 |
}
|
2250 |
}
|
| 2240 |
}
|
2251 |
}
|
| Line 2241... |
Line -... |
| 2241 |
|
- |
|
| 2242 |
private void rafraichirProjetListe(ProjetListe projets) {
|
- |
|
| 2243 |
List<Projet> liste = projets.toList();
|
- |
|
| 2244 |
projetsMagazin.removeAll();
|
- |
|
| 2245 |
projetsMagazin.add(liste);
|
- |
|
| 2246 |
projetsCombo.setStore(projetsMagazin);
|
- |
|
| 2247 |
}
|
- |
|
| 2248 |
|
2252 |
|
| Line 2249... |
Line 2253... |
| 2249 |
private void testerLancementRafraichirPersonnel() {
|
2253 |
private void testerLancementRafraichirPersonnel() {
|
| 2250 |
|
2254 |
|
| 2251 |
decompteRafraichissementPersonnel--;
|
2255 |
decompteRafraichissementPersonnel--;
|