Subversion Repositories eFlore/Applications.coel

Compare Revisions

Ignore whitespace Rev 1308 → Rev 1307

/branches/v1.0-syrah/src/org/tela_botanica/client/vues/personne/PersonneForm.java
1265,12 → 1265,16
Radio rbEstDecedee = hmIdentite.getRadio("rbEstDecedee");
if (rbEstDecedee.getValue() == true) {
String decesLieu = (String) hmIdentite.getTextField("tfLieuDeces").getValue();
//Verifier que la date est soit JJ/MM/AAAA soit AAAA
Date dateDeces = null;
String valeurDateDeces = (String) hmIdentite.getTextField("tfDateDeces").getValue();
String valeurDateDeces = (String) hmIdentite.getTextField("tfDateDeces").getValue();
Debug.log("DANS FORM valeurDateDeces="+valeurDateDeces);
if (!UtilString.isEmpty(valeurDateDeces)) {
if (valeurDateDeces.matches("\\d{2}/\\d{2}/\\d{4}")) {
dateDeces = DateTimeFormat.getFormat("dd/MM/yyyy").parse(valeurDateDeces);
/branches/v1.0-syrah/src/org/tela_botanica/client/vues/collection/CollectionFormPersonne.java
341,7 → 341,10
if ((relationCollectionPersonne.get("_etat_").equals("") || !relationCollectionPersonne.get("_etat_").equals(aDonnee.ETAT_AJOUTE))
&& relationCollectionPersonne.getId() != null
&& !relationCollectionPersonne.getId().equals("")) {
Debug.log("Nbre personnes supprimées avant:"+personnesSupprimees.size());
personnesSupprimees.put("id"+idGenere++, relationCollectionPersonne);
GWT.log("Personne supprimées : "+relationCollectionPersonne.getPersonne().getId()+" "+relationCollectionPersonne.getPersonne().getPrenom()+" "+relationCollectionPersonne.getPersonne().getNom(), null);
Debug.log("Nbre personnes supprimées :"+personnesSupprimees.size());
}
// Suppression de l'enregistrement de la grille
364,6 → 367,7
storeGrille.addListener(Store.Update, new Listener<StoreEvent<CollectionAPersonne>>() {
public void handleEvent(StoreEvent<CollectionAPersonne> ce) {
if (ce.getRecord().isModified("_role_") && !ce.getModel().get("_etat_").equals(aDonnee.ETAT_AJOUTE)) {
Debug.log("id role modifié");
ce.getModel().set("_etat_", aDonnee.ETAT_MODIFIE);
}
}
418,6 → 422,7
public Object preProcessValue(Object valeur) {
Valeur retour = null;
if (valeur != null ) {
Debug.log(valeur.toString());
if (typeRelationCombo.getStore().findModel("nom", valeur.toString()) != null) {
retour = typeRelationCombo.getStore().findModel("nom", valeur.toString());
} else if (typeRelationCombo.getStore().findModel("abr", valeur.toString()) != null) {
599,14 → 604,18
if (relationCollectionPersonne.get("_etat_").equals(aDonnee.ETAT_MODIFIE)) {
// Comme il est impossible de modifier les relations nous supprimons l'ancien enregistrement et ajoutons un nouveau avec le nouveau id_role
personnesSupprimees.put("id"+idGenere++, relationCollectionPersonne);
Debug.log("AVANT:"+relationCollectionPersonne.getIdRole());
CollectionAPersonne relationAAjouter = (CollectionAPersonne) relationCollectionPersonne.cloner(new CollectionAPersonne());
corrigerChampsGrille(relationAAjouter);// Nous modifions l'id_role
Debug.log("APRES:"+relationAAjouter.getIdRole());
personnesAjoutees.put("id"+idGenere++, relationAAjouter);
GWT.log("Personne modifiées : "+relationAAjouter.getPersonne().getPrenom()+" "+relationAAjouter.getPersonne().getNom(), null);
}
if (relationCollectionPersonne.get("_etat_").equals(aDonnee.ETAT_AJOUTE)) {
corrigerChampsGrille(relationCollectionPersonne);// Nous modifions l'id_role
personnesAjoutees.put("id"+idGenere++, relationCollectionPersonne);
GWT.log("Personne ajoutées : "+relationCollectionPersonne.getPersonne().getPrenom()+" "+relationCollectionPersonne.getPersonne().getNom(), null);
}
// Initialisation de la grille
relationCollectionPersonne.set("_etat_", "");
640,6 → 649,7
// Suppression des relations StructureAPersonne
if (personnesSupprimees.size() != 0) {
mediateur.supprimerCollectionAPersonne(this, personnesSupprimees);
Debug.log("Nbre personnes supprimées :"+personnesSupprimees.size());
}
}
}
/branches/v1.0-syrah/src/org/tela_botanica/client/vues/collection/CollectionFormPublication.java
323,7 → 323,10
if ((publicationLiee.get("_etat_").equals("") || !publicationLiee.get("_etat_").equals(aDonnee.ETAT_AJOUTE))
&& publicationLiee.getId() != null
&& !publicationLiee.getId().equals("")) {
Debug.log("Nbre publications supprimées avant:"+publicationsSupprimees.size());
publicationsSupprimees.put("id"+idGenere++, publicationLiee);
GWT.log("Publications supprimée : "+publicationLiee.getPublication().getId()+" "+publicationLiee.getPublication().getNomComplet(), null);
Debug.log("Nbre publications supprimées :"+publicationsSupprimees.size());
}
// Suppression de l'enregistrement de la grille
504,9 → 507,11
CollectionAPublication relationAAjouter = (CollectionAPublication) publicationLiee.cloner(new CollectionAPublication());
publicationsAjoutees.put("id"+idGenere++, relationAAjouter);
Debug.log(publicationLiee.toString());
}
if (publicationLiee.get("_etat_").equals(aDonnee.ETAT_AJOUTE)) {
publicationsAjoutees.put("id"+idGenere++, publicationLiee);
Debug.log(publicationLiee.toString());
}
// Initialisation de la grille
publicationLiee.set("_etat_", "");
524,10 → 529,12
// Ajout des relations CollectionAPublication
if (publicationsAjoutees.size() != 0) {
mediateur.ajouterCollectionAPublication(this, collection.getId(), publicationsAjoutees);
Debug.log("Nbre publications ajoutées :"+publicationsAjoutees.size());
}
// Suppression des relations CollectionAPublication
if (publicationsSupprimees.size() != 0) {
mediateur.supprimerCollectionAPublication(this, publicationsSupprimees);
Debug.log("Nbre publications supprimées :"+publicationsSupprimees.size());
}
}
}
/branches/v1.0-syrah/src/org/tela_botanica/client/vues/collection/CollectionFormCommentaire.java
336,7 → 336,10
if ((relationCollectionACommentaire.get("_etat_").equals("") || !relationCollectionACommentaire.get("_etat_").equals(aDonnee.ETAT_AJOUTE))
&& relationCollectionACommentaire.getId() != null
&& !relationCollectionACommentaire.getId().equals("")) {
Debug.log("Nbre commentaires supprimées avant:"+commentairesSupprimes.size());
commentairesSupprimes.put("id"+idGenere++, relationCollectionACommentaire);
Debug.log("Commentaires supprimées : "+relationCollectionACommentaire.getCommentaire().getId());
Debug.log("Nbre commentaires supprimées :"+commentairesSupprimes.size());
}
// Suppression de l'enregistrement de la grille
359,6 → 362,7
storeGrille.addListener(Store.Update, new Listener<StoreEvent<CollectionACommentaire>>() {
public void handleEvent(StoreEvent<CollectionACommentaire> ce) {
if (ce.getRecord().isModified("_type_") && !ce.getModel().get("_etat_").equals(aDonnee.ETAT_AJOUTE)) {
Debug.log("id type modifié : "+ce.getModel().get("_type_"));
ce.getModel().set("_etat_", aDonnee.ETAT_MODIFIE);
}
}
418,6 → 422,7
if (getField().getRawValue() != null ) {
retour = getField().getRawValue();
}
Debug.log("Post : "+retour);
return retour;
}
};
425,9 → 430,11
GridCellRenderer<CollectionACommentaire> typeRendu = new GridCellRenderer<CollectionACommentaire>() {
public String render(CollectionACommentaire model, String property, ColumnData config, int rowIndex, int colIndex, ListStore<CollectionACommentaire> store, Grid<CollectionACommentaire> grid) {
String type = model.get("_type_");
Debug.log("Initialisation type origine :"+type);
if (typeCombo.getStore() != null && type != null && (type.matches("[0-9]+") || type.contains(aDonnee.SEPARATEUR_VALEURS))) {
type = typeCombo.formaterIdentifiantsEnTexte(type);
model.set("_type_", type);
Debug.log("Initialisation :"+type);
}
return type;
}
568,10 → 575,12
if (relationCollectionACommentaire.get("_etat_").equals(aDonnee.ETAT_MODIFIE)) {
corrigerChampsGrille(relationCollectionACommentaire);// Nous modifions l'id_type
commentairesModifies.put("id"+idGenere++, relationCollectionACommentaire);
Debug.log("Commentaires modifiés : "+relationCollectionACommentaire.getCommentaire().getTitre());
}
if (relationCollectionACommentaire.get("_etat_").equals(aDonnee.ETAT_AJOUTE)) {
corrigerChampsGrille(relationCollectionACommentaire);// Nous modifions l'id_type
commentairesAjoutes.put("id"+idGenere++, relationCollectionACommentaire);
Debug.log("Commentaires ajoutés : "+relationCollectionACommentaire.getCommentaire().getTitre());
}
// Initialisation de la grille
relationCollectionACommentaire.set("_etat_", "");
/branches/v1.0-syrah/src/org/tela_botanica/client/vues/commentaire/CommentaireForm.java
207,6 → 207,7
 
private Boolean etreValide() {
Boolean valide = false;
Debug.log("formulaire"+formulaireValideOk+" - Commentaire :"+commentaireValideOk);
if (formulaireValideOk && commentaireValideOk) {
valide = true;
}
/branches/v1.0-syrah/src/org/tela_botanica/client/vues/projet/ProjetForm.java
433,6 → 433,7
Projet projetARetourner = null;
if (!projetCollecte.comparer(projet)) {
projetARetourner = projet = projetCollecte;
Debug.log(projetARetourner.toString());
}
return projetARetourner;
}
/branches/v1.0-syrah/src/org/tela_botanica/client/composants/ChampComboBoxMultiSelect.java
1299,6 → 1299,7
}
expanded = true;
Debug.log("dans expand");
if (!initialized) {
createList(false);
} else {
1318,12 → 1319,15
premierAppel = false;
collapse();
expand();
Debug.log("premier appel");
}
}
 
protected void initList() {
Debug.log("initialisation de la liste");
if (listView == null) {
Debug.log("La vue de la liste était nulle");
setView(new CheckBoxListView<D>());
}
 
1406,6 → 1410,7
setSelection(getSelection());
setRawValue(collecterTexte());
updateHiddenValue();
Debug.log("Mise à jour "+origine+" : "+collecterTexte());
}
private void nettoyerListeDeCasesACocher() {
1468,7 → 1473,9
if (!UtilString.isEmpty(chaineAAnalyser)) {
String[] valeurs = chaineAAnalyser.split(separateur);
int nbreValeurs = valeurs.length;
Debug.log("Executer peuplement : "+chaineAAnalyser+" - nbre : "+nbreValeurs);
if (nbreValeurs > 0 && getStore() != null) {
Debug.log("Executer peuplement : "+chaineAAnalyser+" - nbre : "+nbreValeurs);
for (int i = 0; i < nbreValeurs; i++) {
String valeur = valeurs[i];
D d = getStore().findModel(champCle, valeur);
/branches/v1.0-syrah/src/org/tela_botanica/client/modeles/collection/CollectionACommentaireAsyncDao.java
32,7 → 32,7
String[] parametres = {collectionId};
final JsonRestRequestBuilder rb = UtilDAO.construireRequete(SERVICE_NOM, parametres);
 
Debug.log(rb.getUrl());
rb.envoyerRequete(null, new JsonRestRequestCallback() {
@Override
public void surReponse(JSONValue responseValue) {
/branches/v1.0-syrah/src/org/tela_botanica/client/modeles/collection/CollectionAPersonneAsyncDao.java
30,7 → 30,7
String[] parametres = {collectionId, roleId};
final JsonRestRequestBuilder rb = UtilDAO.construireRequete(SERVICE_NOM, parametres);
 
Debug.log(rb.getUrl());
rb.envoyerRequete(null, new JsonRestRequestCallback() {
@Override
public void surReponse(JSONValue responseValue) {
81,7 → 81,7
final JsonRestRequestBuilder rb = UtilDAO.construireRequetePost(SERVICE_NOM, parametres);
String postDonneesEncodees = construirePost(personnes.getIdCollection(), personnes);
 
Debug.log(rb.getUrl());
rb.envoyerRequete(postDonneesEncodees, new JsonRestRequestCallback() {
@Override
public void surReponse(JSONValue responseValue) {
/branches/v1.0-syrah/src/org/tela_botanica/client/modeles/collection/CollectionAPublicationAsyncDao.java
30,7 → 30,7
String[] parametres = {collectionId};
final JsonRestRequestBuilder rb = UtilDAO.construireRequete(SERVICE_NOM, parametres);
 
Debug.log(rb.getUrl());
rb.envoyerRequete(null, new JsonRestRequestCallback() {
@Override
public void surReponse(JSONValue responseValue) {