Subversion Repositories eFlore/Applications.coel

Compare Revisions

Ignore whitespace Rev 1307 → Rev 1308

/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_", "");