Subversion Repositories eFlore/Applications.del

Rev

Rev 663 | Rev 690 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 663 Rev 685
Line 1... Line 1...
1
package org.tela_botanica.del.client.vues.plateformedetermination.formulairecommentaire;
1
package org.tela_botanica.del.client.composants.formulaires.formulairecommentaire;
Line 2... Line 2...
2
 
2
 
Line 3... Line 3...
3
import java.util.Date;
3
import java.util.Date;
4
 
4
 
Line 73... Line 73...
73
 
73
 
74
				if (!validerNomPrenom() || !validerCommentaire()) {
74
				if (!validerNomPrenom() || !validerCommentaire()) {
75
					return;
75
					return;
Line 76... Line -...
76
				}
-
 
77
 
-
 
78
				String texteCommentaire = vue.getCommentaire().getText();
-
 
79
				String nomPrenom = vue.getNomPrenom().getText();
-
 
80
 
-
 
81
				Commentaire commentaire = new Commentaire(nomPrenom, new Date(), texteCommentaire);
76
				}
82
 
-
 
83
				if (observation != null) {
-
 
84
					observation.getInterventionsForum().add(commentaire);
-
 
85
				} else if (possesseurDeCommentaires != null) {
-
 
86
					possesseurDeCommentaires.getListeCommentaires().add(commentaire);
-
 
87
				}
-
 
88
 
77
 
89
				BusEvenementiel.getInstance().fireEvent(new EvenementAjoutCommentaire(commentaire));
78
				surValidationCommentaire();
90
			}
79
			}
-
 
80
		});
-
 
81
	}
-
 
82
	
-
 
83
	public void surValidationCommentaire() {
-
 
84
		
-
 
85
		String texteCommentaire = vue.getCommentaire().getText();
-
 
86
		String nomPrenom = vue.getNomPrenom().getText();
-
 
87
 
-
 
88
		Commentaire commentaire = new Commentaire(nomPrenom, new Date(), texteCommentaire);
-
 
89
 
-
 
90
		if (observation != null) {
-
 
91
			observation.getInterventionsForum().add(commentaire);
-
 
92
		} else if (possesseurDeCommentaires != null) {
-
 
93
			possesseurDeCommentaires.getListeCommentaires().add(commentaire);
-
 
94
		}
-
 
95
 
Line 91... Line 96...
91
		});
96
		BusEvenementiel.getInstance().fireEvent(new EvenementAjoutCommentaire(commentaire));
Line 92... Line 97...
92
	}
97
	}
93
 
98