| Line 32... |
Line 32... |
| 32 |
import org.tela_botanica.client.modeles.projet.ProjetListe;
|
32 |
import org.tela_botanica.client.modeles.projet.ProjetListe;
|
| 33 |
import org.tela_botanica.client.modeles.publication.Publication;
|
33 |
import org.tela_botanica.client.modeles.publication.Publication;
|
| 34 |
import org.tela_botanica.client.modeles.publication.PublicationAPersonneListe;
|
34 |
import org.tela_botanica.client.modeles.publication.PublicationAPersonneListe;
|
| 35 |
import org.tela_botanica.client.modeles.publication.PublicationListe;
|
35 |
import org.tela_botanica.client.modeles.publication.PublicationListe;
|
| 36 |
import org.tela_botanica.client.synchronisation.Sequenceur;
|
36 |
import org.tela_botanica.client.synchronisation.Sequenceur;
|
| - |
|
37 |
import org.tela_botanica.client.util.Debug;
|
| 37 |
import org.tela_botanica.client.util.Pattern;
|
38 |
import org.tela_botanica.client.util.Pattern;
|
| 38 |
import org.tela_botanica.client.util.UtilString;
|
39 |
import org.tela_botanica.client.util.UtilString;
|
| 39 |
import org.tela_botanica.client.vues.Formulaire;
|
40 |
import org.tela_botanica.client.vues.Formulaire;
|
| Line 40... |
Line 41... |
| 40 |
|
41 |
|
| Line 64... |
Line 65... |
| 64 |
import com.extjs.gxt.ui.client.widget.ContentPanel;
|
65 |
import com.extjs.gxt.ui.client.widget.ContentPanel;
|
| 65 |
import org.tela_botanica.client.composants.InfoLogger;
|
66 |
import org.tela_botanica.client.composants.InfoLogger;
|
| 66 |
import org.tela_botanica.client.composants.pagination.Proxy;
|
67 |
import org.tela_botanica.client.composants.pagination.Proxy;
|
| 67 |
import org.tela_botanica.client.composants.pagination.ProxyProjets;
|
68 |
import org.tela_botanica.client.composants.pagination.ProxyProjets;
|
| 68 |
import org.tela_botanica.client.composants.pagination.ProxyValeur;
|
69 |
import org.tela_botanica.client.composants.pagination.ProxyValeur;
|
| 69 |
import org.tela_botanica.client.composants.pagination.TransformateurJSONaModelData;
|
- |
|
| Line 70... |
Line 70... |
| 70 |
|
70 |
|
| 71 |
import com.extjs.gxt.ui.client.widget.TabItem;
|
71 |
import com.extjs.gxt.ui.client.widget.TabItem;
|
| 72 |
import com.extjs.gxt.ui.client.widget.TabPanel;
|
72 |
import com.extjs.gxt.ui.client.widget.TabPanel;
|
| Line 251... |
Line 251... |
| 251 |
modelTypeProjets.setTotalName("nbElements");
|
251 |
modelTypeProjets.setTotalName("nbElements");
|
| 252 |
modelTypeProjets.addField("cpr_nom");
|
252 |
modelTypeProjets.addField("cpr_nom");
|
| 253 |
modelTypeProjets.addField("cpr_id_projet");
|
253 |
modelTypeProjets.addField("cpr_id_projet");
|
| Line 254... |
Line 254... |
| 254 |
|
254 |
|
| 255 |
String displayNameProjets = "cpr_nom";
|
255 |
String displayNameProjets = "cpr_nom";
|
| Line 256... |
Line 256... |
| 256 |
ProxyProjets<ModelData> proxyProjets = new ProxyProjets<ModelData>(sequenceur);
|
256 |
ProxyProjets<ModelData> proxyProjets = new ProxyProjets<ModelData>(null);
|
| 257 |
|
257 |
|
| 258 |
ChampComboBoxRechercheTempsReelPaginable cbProjets = new ChampComboBoxRechercheTempsReelPaginable(proxyProjets, modelTypeProjets, displayNameProjets);
|
258 |
ChampComboBoxRechercheTempsReelPaginable cbProjets = new ChampComboBoxRechercheTempsReelPaginable(proxyProjets, modelTypeProjets, displayNameProjets);
|
| 259 |
cbProjets.setWidth(100, 600);
|
259 |
cbProjets.setWidth(100, 600);
|
| Line 677... |
Line 677... |
| 677 |
typeTypes.addField("cmlv_abreviation");
|
677 |
typeTypes.addField("cmlv_abreviation");
|
| 678 |
typeTypes.addField("cmlv_description");
|
678 |
typeTypes.addField("cmlv_description");
|
| Line 679... |
Line 679... |
| 679 |
|
679 |
|
| 680 |
String displayNameTypes = "cmlv_nom";
|
680 |
String displayNameTypes = "cmlv_nom";
|
| 681 |
String nomListeTypes = "pays";
|
681 |
String nomListeTypes = "pays";
|
| Line 682... |
Line 682... |
| 682 |
ProxyValeur<ModelData> proxyTypes = new ProxyValeur<ModelData>(nomListeTypes, sequenceur);
|
682 |
ProxyValeur<ModelData> proxyTypes = new ProxyValeur<ModelData>(nomListeTypes, null);
|
| Line 683... |
Line 683... |
| 683 |
|
683 |
|
| 684 |
ChampMultiValeursMultiTypesPaginable recolte = new ChampMultiValeursMultiTypesPaginable(i18nC.personneRecolte(), 450, false, null, null, null, typeTypes, proxyTypes, displayNameTypes);
|
684 |
ChampMultiValeursMultiTypesPaginable recolte = new ChampMultiValeursMultiTypesPaginable(i18nC.personneRecolte(), 450, false, null, null, null, typeTypes, proxyTypes, displayNameTypes);
|
| Line 1002... |
Line 1002... |
| 1002 |
|
1002 |
|
| Line 1003... |
Line 1003... |
| 1003 |
private void mettreAJourPersonne(Personne personne) {
|
1003 |
private void mettreAJourPersonne(Personne personne) {
|
| 1004 |
|
1004 |
|
| - |
|
1005 |
//Mise à jour de la personne
|
| - |
|
1006 |
ChampComboBoxRechercheTempsReelPaginable cbProjets = hmIdentite.getComboBoxRechercheTempsReelPaginable("cbProjets");
|
| - |
|
1007 |
if (cbProjets.getCombo().getStore() != null
|
| - |
|
1008 |
&& personne != null
|
| 1005 |
//Mise à jour de la personne
|
1009 |
&& personne.getIdProjet() != null
|
| - |
|
1010 |
&& !UtilString.isEmpty(personne.getIdProjet())) {
|
| - |
|
1011 |
cbProjets.chargerValeurInitiale(personne.getIdProjet(), "cpr_id_projet");
|
| - |
|
1012 |
} else {
|
| Line 1006... |
Line 1013... |
| 1006 |
ChampComboBoxRechercheTempsReelPaginable cbProjets = hmIdentite.getComboBoxRechercheTempsReelPaginable("cbProjets");
|
1013 |
cbProjets.getCombo().setValue(null);
|
| 1007 |
cbProjets.getCombo().setValue(cbProjets.getStore().findModel("cpr_id_projet", personne.get("ce_projet")));
|
1014 |
}
|
| 1008 |
|
1015 |
|
| Line 1280... |
Line 1287... |
| 1280 |
traiterDate("décès", valeurDateDeces, personneSelectionnee, lstMessageErreur);
|
1287 |
traiterDate("décès", valeurDateDeces, personneSelectionnee, lstMessageErreur);
|
| 1281 |
// lieu
|
1288 |
// lieu
|
| 1282 |
String decesLieu = (String) hmIdentite.getTextField("tfLieuDeces").getValue();
|
1289 |
String decesLieu = (String) hmIdentite.getTextField("tfLieuDeces").getValue();
|
| 1283 |
personneSelectionnee.setDecesLieu(decesLieu);
|
1290 |
personneSelectionnee.setDecesLieu(decesLieu);
|
| 1284 |
} else {
|
1291 |
} else {
|
| 1285 |
personneSelectionnee.setNonDecedee();
|
1292 |
personneSelectionnee.setNonDecedee();
|
| 1286 |
}
|
1293 |
}
|
| Line 1287... |
Line 1294... |
| 1287 |
|
1294 |
|
| 1288 |
strValeur = obtenirValeurCombo("cbPays");
|
1295 |
strValeur = obtenirValeurCombo("cbPays");
|
| Line 1326... |
Line 1333... |
| 1326 |
|
1333 |
|
| 1327 |
return success;
|
1334 |
return success;
|
| Line 1328... |
Line 1335... |
| 1328 |
}
|
1335 |
}
|
| - |
|
1336 |
|
| 1329 |
|
1337 |
private void traiterDate(String typeDate, String date, Personne personneSelectionnee, LinkedList<String> lstMessageErreur) {
|
| - |
|
1338 |
|
| 1330 |
private void traiterDate(String typeDate, String date, Personne personneSelectionnee, LinkedList<String> lstMessageErreur) {
|
1339 |
String valeurDate = date;
|
| 1331 |
String valeurDate = date;
|
- |
|
| 1332 |
if (!UtilString.isEmpty(valeurDate)){
|
1340 |
|
| 1333 |
|
1341 |
if (!UtilString.isEmpty(valeurDate)){
|
| 1334 |
String jour = "";
|
1342 |
String jour = "";
|
| Line 1335... |
Line 1343... |
| 1335 |
String mois = "";
|
1343 |
String mois = "";
|
| Line 1383... |
Line 1391... |
| 1383 |
else if (typeDate=="décès") {
|
1391 |
else if (typeDate=="décès") {
|
| 1384 |
personneSelectionnee.set("deces_date", valeurDate + "-00-00");
|
1392 |
personneSelectionnee.set("deces_date", valeurDate + "-00-00");
|
| 1385 |
personneSelectionnee.set("ce_deces", personneSelectionnee.ETRE_DECEDE);
|
1393 |
personneSelectionnee.set("ce_deces", personneSelectionnee.ETRE_DECEDE);
|
| 1386 |
}
|
1394 |
}
|
| 1387 |
}
|
1395 |
}
|
| - |
|
1396 |
}
|
| 1388 |
} else {
|
1397 |
else {
|
| 1389 |
lstMessageErreur.add("La date de "+typeDate+" n'est pas au format JJ/MM/AAAA ou MM/AAAA ou AAAA.");
|
1398 |
lstMessageErreur.add("La date de "+typeDate+" n'est pas au format JJ/MM/AAAA ou MM/AAAA ou AAAA.");
|
| 1390 |
}
|
1399 |
}
|
| - |
|
1400 |
|
| - |
|
1401 |
/** Date vide **/
|
| - |
|
1402 |
} else {
|
| - |
|
1403 |
personneSelectionnee.set("deces_date", "0000-00-00");
|
| - |
|
1404 |
personneSelectionnee.set("ce_deces", personneSelectionnee.ETRE_DECEDE);
|
| 1391 |
}
|
1405 |
}
|
| 1392 |
}
|
1406 |
}
|
| Line 1393... |
Line 1407... |
| 1393 |
|
1407 |
|
| 1394 |
public Personne getPersonne() {
|
1408 |
public Personne getPersonne() {
|
| 1395 |
return this.personne;
|
1409 |
return this.personne;
|