Subversion Repositories eFlore/Applications.coel

Compare Revisions

Ignore whitespace Rev 1307 → Rev 1308

/branches/v1.0-syrah/src/org/tela_botanica/client/vues/projet/ProjetForm.java
433,7 → 433,6
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/vues/commentaire/CommentaireForm.java
207,7 → 207,6
 
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/personne/PersonneForm.java
1265,16 → 1265,12
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/CollectionFormCommentaire.java
336,10 → 336,7
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
362,7 → 359,6
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);
}
}
422,7 → 418,6
if (getField().getRawValue() != null ) {
retour = getField().getRawValue();
}
Debug.log("Post : "+retour);
return retour;
}
};
430,11 → 425,9
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;
}
575,12 → 568,10
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/collection/CollectionFormPersonne.java
341,10 → 341,7
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
367,7 → 364,6
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);
}
}
422,7 → 418,6
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) {
604,18 → 599,14
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_", "");
649,7 → 640,6
// 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,10 → 323,7
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
507,11 → 504,9
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_", "");
529,12 → 524,10
// 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/composants/ChampComboBoxMultiSelect.java
1299,7 → 1299,6
}
expanded = true;
Debug.log("dans expand");
if (!initialized) {
createList(false);
} else {
1319,15 → 1318,12
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>());
}
 
1410,7 → 1406,6
setSelection(getSelection());
setRawValue(collecterTexte());
updateHiddenValue();
Debug.log("Mise à jour "+origine+" : "+collecterTexte());
}
private void nettoyerListeDeCasesACocher() {
1473,9 → 1468,7
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/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) {
/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) {