Subversion Repositories eFlore/Applications.coel

Rev

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

Rev 924 Rev 928
Line 8... Line 8...
8
import org.tela_botanica.client.modeles.Information;
8
import org.tela_botanica.client.modeles.Information;
9
import org.tela_botanica.client.modeles.MenuApplicationId;
9
import org.tela_botanica.client.modeles.MenuApplicationId;
10
import org.tela_botanica.client.modeles.Projet;
10
import org.tela_botanica.client.modeles.Projet;
11
import org.tela_botanica.client.modeles.Valeur;
11
import org.tela_botanica.client.modeles.Valeur;
12
import org.tela_botanica.client.modeles.ValeurListe;
12
import org.tela_botanica.client.modeles.ValeurListe;
-
 
13
import org.tela_botanica.client.util.Debug;
13
import org.tela_botanica.client.util.Pattern;
14
import org.tela_botanica.client.util.Pattern;
14
import org.tela_botanica.client.util.UtilArray;
15
import org.tela_botanica.client.util.UtilArray;
-
 
16
import org.tela_botanica.client.util.UtilString;
Line 15... Line 17...
15
 
17
 
16
import com.extjs.gxt.ui.client.Style.SortDir;
18
import com.extjs.gxt.ui.client.Style.SortDir;
17
import com.extjs.gxt.ui.client.event.ButtonEvent;
19
import com.extjs.gxt.ui.client.event.ButtonEvent;
18
import com.extjs.gxt.ui.client.event.SelectionListener;
20
import com.extjs.gxt.ui.client.event.SelectionListener;
-
 
21
import com.extjs.gxt.ui.client.store.ListStore;
19
import com.extjs.gxt.ui.client.store.ListStore;
22
import com.extjs.gxt.ui.client.widget.Info;
20
import com.extjs.gxt.ui.client.widget.MessageBox;
23
import com.extjs.gxt.ui.client.widget.MessageBox;
21
import com.extjs.gxt.ui.client.widget.button.Button;
24
import com.extjs.gxt.ui.client.widget.button.Button;
22
import com.extjs.gxt.ui.client.widget.form.CheckBox;
25
import com.extjs.gxt.ui.client.widget.form.CheckBox;
23
import com.extjs.gxt.ui.client.widget.form.ComboBox;
26
import com.extjs.gxt.ui.client.widget.form.ComboBox;
24
import com.extjs.gxt.ui.client.widget.form.FieldSet;
27
import com.extjs.gxt.ui.client.widget.form.FieldSet;
25
import com.extjs.gxt.ui.client.widget.form.TextArea;
28
import com.extjs.gxt.ui.client.widget.form.TextArea;
26
import com.extjs.gxt.ui.client.widget.form.TextField;
29
import com.extjs.gxt.ui.client.widget.form.TextField;
27
import com.extjs.gxt.ui.client.widget.layout.FlowLayout;
30
import com.extjs.gxt.ui.client.widget.layout.FlowLayout;
28
import com.extjs.gxt.ui.client.widget.layout.FormData;
31
import com.extjs.gxt.ui.client.widget.layout.FormData;
29
import com.extjs.gxt.ui.client.widget.layout.FormLayout;
-
 
30
import com.google.gwt.core.client.GWT;
-
 
Line 31... Line 32...
31
 
32
import com.extjs.gxt.ui.client.widget.layout.FormLayout;
Line 32... Line 33...
32
 
33
 
Line 94... Line 95...
94
		
95
		
95
		String modeDeCreation = (projet.getId().isEmpty() ? Formulaire.MODE_AJOUTER : Formulaire.MODE_MODIFIER);
96
		String modeDeCreation = (projet.getId().isEmpty() ? Formulaire.MODE_AJOUTER : Formulaire.MODE_MODIFIER);
Line 96... Line 97...
96
		initialiserFormulaire(mediateurCourant, modeDeCreation, MenuApplicationId.PROJET);
97
		initialiserFormulaire(mediateurCourant, modeDeCreation, MenuApplicationId.PROJET);
97
		
98
		
98
		panneauFormulaire.setLayout(new FlowLayout());
-
 
Line 99... Line 99...
99
		String titre = genererTitreFormulaire();
99
		panneauFormulaire.setLayout(new FlowLayout());
100
		panneauFormulaire.setHeading(titre);
100
		actualiserTitreFormulaire();
Line 101... Line 101...
101
		
101
		
Line 109... Line 109...
109
		panneauFormulaire.add(indexationFieldset);
109
		panneauFormulaire.add(indexationFieldset);
Line 110... Line 110...
110
		
110
		
Line 111... Line 111...
111
		creerTabIndex();
111
		creerTabIndex();
112
		
112
		
113
		if (modeDeCreation.equals(Formulaire.MODE_MODIFIER)) {
113
		if (modeDeCreation.equals(Formulaire.MODE_MODIFIER)) {
Line 114... Line 114...
114
			mediateurCourant.selectionnerProjet(this, projetId);
114
			mediateur.selectionnerProjet(this, projetId);
115
		}
115
		}
116
			
116
			
117
		mediateurCourant.obtenirListeValeurEtRafraichir(this, listeValeurIndexationDureeId);
117
		mediateur.obtenirListeValeurEtRafraichir(this, listeValeurIndexationDureeId);
Line 118... Line 118...
118
		mediateurCourant.obtenirListeValeurEtRafraichir(this, listeValeurIndexationFrequenceId);
118
		mediateur.obtenirListeValeurEtRafraichir(this, listeValeurIndexationFrequenceId);
119
		mediateurCourant.obtenirListeValeurEtRafraichir(this, listeLanguesId);
119
		mediateur.obtenirListeValeurEtRafraichir(this, listeLanguesId);
120
	}
120
	}
121
	
121
	
122
	private String genererTitreFormulaire() {
122
	private void actualiserTitreFormulaire() {
123
		String titre = "Ajout d'un projet";
123
		String titre = i18nC.projetTitreFormAjout();
124
		if (mode.equals(Formulaire.MODE_MODIFIER)) {
124
		if (mode.equals(Formulaire.MODE_MODIFIER)) {
Line 125... Line 125...
125
			 titre = "Modification d'un projet - "+i18nC.id()+": "+projet.getId();
125
			 titre = i18nC.projetTitreFormModif()+" - "+i18nC.id()+": "+projet.getId();
126
		}
126
		}
127
		return titre;
127
		panneauFormulaire.setHeading(titre);
Line 128... Line 128...
128
	}
128
	}
129
			
129
			
130
	private void creerZoneGeneralites() {
130
	private void creerZoneGeneralites() {
131
		FormLayout layout = new FormLayout();
131
		FormLayout layout = new FormLayout();
132
		layout.setLabelWidth(100);
132
		layout.setLabelWidth(100);
Line 133... Line 133...
133
		
133
		
134
		// Fieldset Infos Générales
134
		// Fieldset Infos Générales
Line 161... Line 161...
161
	
161
	
162
	private void creerZoneComplement() {
162
	private void creerZoneComplement() {
163
		FormLayout layout = new FormLayout();
163
		FormLayout layout = new FormLayout();
Line 164... Line 164...
164
		layout.setLabelWidth(100);
164
		layout.setLabelWidth(100);
165
		
165
		
166
		// Fieldset Edition
166
		// Fieldset Complément
167
		complementFieldset = new FieldSet();
167
		complementFieldset = new FieldSet();
168
		complementFieldset.setHeading("Informations complémentaires");
168
		complementFieldset.setHeading(i18nC.projetTitreComplement());
Line 169... Line 169...
169
		complementFieldset.setCollapsible(true);
169
		complementFieldset.setCollapsible(true);
170
		complementFieldset.setLayout(layout);
170
		complementFieldset.setLayout(layout);
171
		
-
 
172
		motsClesChp = new TextField<String>();
171
		
Line 173... Line 172...
173
		motsClesChp.setFieldLabel("Mots Clés");
172
		motsClesChp = new TextField<String>();
174
		
173
		motsClesChp.setFieldLabel("Mots Clés");
175
		complementFieldset.add(motsClesChp);
-
 
176
		
174
		complementFieldset.add(motsClesChp);
Line 177... Line 175...
177
		citationChp = new TextField<String>();
175
		
178
		citationChp.setFieldLabel("Citation");
176
		citationChp = new TextField<String>();
179
		
-
 
180
		complementFieldset.add(citationChp);
177
		citationChp.setFieldLabel("Citation");
Line 181... Line 178...
181
		
178
		complementFieldset.add(citationChp);
182
		licenceChp = new TextField<String>();
179
		
183
		licenceChp.setFieldLabel("Licence");
180
		licenceChp = new TextField<String>();
184
		
181
		licenceChp.setFieldLabel("Licence");
185
		complementFieldset.add(licenceChp);
182
		complementFieldset.add(licenceChp);
186
		
183
		
187
		listeLangue = new ListStore<Valeur>();
184
		listeLangue = new ListStore<Valeur>();
188
		langueChp = new ComboBox<Valeur>();
185
		langueChp = new ComboBox<Valeur>();
189
		langueChp.setStore(listeLangue);
-
 
190
		langueChp.setDisplayField("nom");
186
		langueChp.setStore(listeLangue);
Line 191... Line 187...
191
		langueChp.setEditable(true);
187
		langueChp.setDisplayField("nom");
192
		langueChp.setForceSelection(true);
188
		langueChp.setEditable(true);
193
		langueChp.setTypeAhead(true);
-
 
194
		langueChp.setFieldLabel("Langue");
189
		langueChp.setForceSelection(true);
195
		
190
		langueChp.setTypeAhead(true);
Line 196... Line 191...
196
		complementFieldset.add(langueChp);
191
		langueChp.setFieldLabel("Langue");
197
		
192
		complementFieldset.add(langueChp);
198
		markPublicChp = new CheckBox();
193
		
Line 199... Line 194...
199
		markPublicChp.setFieldLabel("Public");
194
		markPublicChp = new CheckBox();
200
		
195
		markPublicChp.setFieldLabel("Public");
201
		complementFieldset.add(markPublicChp);
196
		complementFieldset.add(markPublicChp);
202
	}
197
	}
203
	
198
	
Line 204... Line 199...
204
	private void creerZoneIndexation() {
199
	private void creerZoneIndexation() {
205
		FormLayout layout = new FormLayout();
200
		FormLayout layout = new FormLayout();
206
		layout.setLabelWidth(100);
-
 
207
		
201
		layout.setLabelWidth(100);
Line 208... Line 202...
208
		// Fieldset Edition
202
		
209
		indexationFieldset = new FieldSet();
203
		// Fieldset Indexation
210
		indexationFieldset.setHeading("Indexation");
204
		indexationFieldset = new FieldSet();
Line 223... Line 217...
223
		indexationFrequenceChp.setDisplayField("nom");
217
		indexationFrequenceChp.setDisplayField("nom");
224
		indexationFrequenceChp.setEditable(true);
218
		indexationFrequenceChp.setEditable(true);
225
		indexationFrequenceChp.setForceSelection(true);
219
		indexationFrequenceChp.setForceSelection(true);
226
		indexationFrequenceChp.setTypeAhead(true);
220
		indexationFrequenceChp.setTypeAhead(true);
227
		indexationFrequenceChp.setFieldLabel(i18nC.projetIndexationFrequence());
221
		indexationFrequenceChp.setFieldLabel(i18nC.projetIndexationFrequence());
228
		
-
 
229
		indexationFieldset.add(indexationFrequenceChp, new FormData(120, 0));
222
		indexationFieldset.add(indexationFrequenceChp, new FormData(120, 0));
Line 230... Line 223...
230
		
223
		
231
		// liste 1072
224
		// liste 1072
232
		listeIndexationDuree = new ListStore<Valeur>();
225
		listeIndexationDuree = new ListStore<Valeur>();
Line 235... Line 228...
235
		indexationDureeChp.setDisplayField("nom");
228
		indexationDureeChp.setDisplayField("nom");
236
		indexationDureeChp.setEditable(true);
229
		indexationDureeChp.setEditable(true);
237
		indexationDureeChp.setForceSelection(true);
230
		indexationDureeChp.setForceSelection(true);
238
		indexationDureeChp.setTypeAhead(true);
231
		indexationDureeChp.setTypeAhead(true);
239
		indexationDureeChp.setFieldLabel(i18nC.projetIndexationDuree());
232
		indexationDureeChp.setFieldLabel(i18nC.projetIndexationDuree());
240
		
-
 
241
		indexationFieldset.add(indexationDureeChp, new FormData(80, 0));
233
		indexationFieldset.add(indexationDureeChp, new FormData(80, 0));
Line 242... Line 234...
242
				
234
				
Line 243... Line 235...
243
	}
235
	}
244
	
-
 
245
	private void creerTabIndex() {
236
	
246
		
237
	private void creerTabIndex() {
247
		nomChp.setTabIndex(1);
238
		nomChp.setTabIndex(1);
248
		abreviationChp.setTabIndex(2);
239
		abreviationChp.setTabIndex(2);
249
		descriptionChp.setTabIndex(3);
240
		descriptionChp.setTabIndex(3);
Line 262... Line 253...
262
		
253
		
263
		nomChp.focus();
254
		nomChp.focus();
Line 264... Line 255...
264
	}
255
	}
265
 
256
 
266
	public void rafraichir(Object nouvellesDonnees) {
257
	public void rafraichir(Object nouvellesDonnees) {
267
		if (nouvellesDonnees instanceof Projet) {
258
		if (nouvellesDonnees instanceof Information) {
268
			// Si on a reçu les details d'une projet
-
 
269
			rafraichirProjet((Projet) nouvellesDonnees);
259
			Information info = (Information) nouvellesDonnees;
270
			GWT.log("Un projet est arrivé : "+((Projet) nouvellesDonnees).getNom(), null);
260
			rafraichirInformation(info);
271
		} else if (nouvellesDonnees instanceof ValeurListe) {
-
 
272
			ValeurListe nValeurListe = (ValeurListe)nouvellesDonnees;
-
 
273
			
-
 
274
			if (nValeurListe.getId() == listeValeurIndexationDureeInt) {
-
 
275
				valeurListeIndexationDuree = nValeurListe;
-
 
276
				
-
 
277
				for (Iterator<String> it  = nValeurListe.keySet().iterator(); it.hasNext();) {
-
 
278
					listeIndexationDuree.add(nValeurListe.get(it.next()));
-
 
279
					listeIndexationDuree.sort("id_valeur", SortDir.ASC);
-
 
280
				}
-
 
281
				listeIndexationDureeChargee = true;
-
 
282
				
-
 
283
				if (mode.equals(MODE_MODIFIER)) {
-
 
284
					if (valeurListeIndexationDuree.get(projet.getIndexationDuree()) != null) {
-
 
285
						indexationDureeChp.setValue(valeurListeIndexationDuree.get(projet.getIndexationDuree()));
-
 
286
						indexationDureeChp.validate();
-
 
287
					}
-
 
288
				}
-
 
289
				indexationDureeChp.expand();
-
 
290
			} else if (nValeurListe.getId() == listeValeurIndexationFrequenceInt) {
-
 
291
				valeurListeIndexationFrequence = nValeurListe;
-
 
292
				for (Iterator<String> it  = nValeurListe.keySet().iterator(); it.hasNext();) {
-
 
293
					listeIndexationFrequence.add(nValeurListe.get(it.next()));
-
 
294
					listeIndexationFrequence.sort("id_valeur", SortDir.ASC);
-
 
295
				}
-
 
296
				listeIndexationFrequenceChargee = true;
-
 
297
				
-
 
298
				if (mode.equals(MODE_MODIFIER)) {
-
 
299
					if (valeurListeIndexationFrequence.get(projet.getIndexationFreq()) != null) {
-
 
300
						indexationFrequenceChp.setValue(valeurListeIndexationFrequence.get(projet.getIndexationFreq()));
-
 
301
						indexationFrequenceChp.validate();
-
 
302
					}
-
 
303
				}
-
 
304
				indexationFrequenceChp.expand();
-
 
305
			} else if (nValeurListe.getId() == listeLanguesInt) {
261
		} else if (nouvellesDonnees instanceof ValeurListe) {
306
				
-
 
307
				valeurListeLangue = nValeurListe;
-
 
308
				
-
 
309
				for (Iterator<String> it  = nValeurListe.keySet().iterator(); it.hasNext();) {
-
 
310
					listeLangue.add(nValeurListe.get(it.next()));
-
 
311
					listeLangue.sort("id_valeur", SortDir.ASC);
-
 
312
				}
-
 
313
				
-
 
314
				listeLangueChargee = true;
-
 
315
				
-
 
316
				if (mode.equals(MODE_MODIFIER)) {
-
 
317
					if (valeurListeLangue.get(projet.getLangue()) != null) {
-
 
318
						langueChp.setValue(valeurListeLangue.get(projet.getLangue()));
-
 
319
						langueChp.validate();
-
 
320
					}
-
 
321
				}
-
 
322
			}
262
			ValeurListe valeursListe = (ValeurListe) nouvellesDonnees;
323
			
263
			rafraichirValeurListe(valeursListe);
Line 324... Line 264...
324
			GWT.log("une liste de valeurs est arrivée "+nValeurListe.getId(), null);
264
			Debug.log("une liste de valeurs est arrivée "+valeursListe.getId());
325
		}
265
		}
326
		
266
		
327
		if (etreValide()) {
267
		if (etreValide()) {
328
			initialiserValidation();
268
			initialiserValidation();
329
			repandreRafraichissement();
269
			repandreRafraichissement();
Line 330... Line 270...
330
			controlerFermetureApresRafraichissement();
270
			controlerFermetureApresRafraichissement();
-
 
271
		}
-
 
272
	}
331
		}
273
 
-
 
274
	private void rafraichirInformation(Information info) {
-
 
275
		final String type = info.getType();
-
 
276
		
-
 
277
		// Gestion des problèmes
-
 
278
		if (info.getMessages() != null && !info.getMessages().toString().equals("[]")) {
-
 
279
			Debug.log("MESSAGES:\n"+info.getMessages().toString());
-
 
280
		}
-
 
281
		
-
 
282
		// Gestion des actions
332
	}
283
		if (type.equals("selection_projet")) {
-
 
284
			if (info.getDonnee(0) != null) {
-
 
285
				projet = (Projet) info.getDonnee(0);
-
 
286
			}
-
 
287
			peuplerFormulaire();
-
 
288
			actualiserTitreFormulaire();
-
 
289
		} else if (type.equals("modif_projet") || type.equals("ajout_projet") ) {
-
 
290
			if (info.getDonnee(0) != null && info.getDonnee(0) instanceof String) {
-
 
291
				String projetId = (String) info.getDonnee(0);
-
 
292
				projet.setId(projetId);
-
 
293
				projetValideOk = true;
-
 
294
			}
-
 
295
		}
-
 
296
		
-
 
297
		// Gestion des messages
-
 
298
		if (type.equals("selection_projet")) {
-
 
299
			Info.display(i18nC.projetTitreFormModif(), info.toString());
-
 
300
		} else if (type.equals("modif_projet")) {
-
 
301
			Info.display(i18nC.projetTitreFormModif(), info.toString());
-
 
302
		} else if (type.equals("ajout_projet")) {
-
 
303
			if (!UtilString.isEmpty(projet.getId())) {
333
 
304
				info.setMessage("Le projet '"+projet.getId()+"' a bien été ajouté");
Line -... Line 305...
-
 
305
			}
-
 
306
			Info.display(i18nC.projetTitreFormAjout(), info.toString());
-
 
307
		}
-
 
308
	}
-
 
309
	
-
 
310
	private void rafraichirValeurListe(ValeurListe valeursListe) {
-
 
311
		if (valeursListe.getId() == listeValeurIndexationDureeInt) {
-
 
312
			valeurListeIndexationDuree = valeursListe;
-
 
313
			for (Iterator<String> it  = valeursListe.keySet().iterator(); it.hasNext();) {
-
 
314
				listeIndexationDuree.add(valeursListe.get(it.next()));
-
 
315
				listeIndexationDuree.sort("id_valeur", SortDir.ASC);
-
 
316
			}
-
 
317
			listeIndexationDureeChargee = true;
-
 
318
			
-
 
319
			if (mode.equals(MODE_MODIFIER)) {
-
 
320
				if (valeurListeIndexationDuree.get(projet.getIndexationDuree()) != null) {
-
 
321
					indexationDureeChp.setValue(valeurListeIndexationDuree.get(projet.getIndexationDuree()));
-
 
322
					indexationDureeChp.validate();
-
 
323
				}
-
 
324
			}
-
 
325
			indexationDureeChp.expand();
-
 
326
		} else if (valeursListe.getId() == listeValeurIndexationFrequenceInt) {
-
 
327
			valeurListeIndexationFrequence = valeursListe;
-
 
328
			for (Iterator<String> it  = valeursListe.keySet().iterator(); it.hasNext();) {
-
 
329
				listeIndexationFrequence.add(valeursListe.get(it.next()));
-
 
330
				listeIndexationFrequence.sort("id_valeur", SortDir.ASC);
-
 
331
			}
-
 
332
			listeIndexationFrequenceChargee = true;
-
 
333
			
-
 
334
			if (mode.equals(MODE_MODIFIER)) {
-
 
335
				if (valeurListeIndexationFrequence.get(projet.getIndexationFreq()) != null) {
-
 
336
					indexationFrequenceChp.setValue(valeurListeIndexationFrequence.get(projet.getIndexationFreq()));
-
 
337
					indexationFrequenceChp.validate();
-
 
338
				}
-
 
339
			}
-
 
340
			indexationFrequenceChp.expand();
-
 
341
		} else if (valeursListe.getId() == listeLanguesInt) {
-
 
342
			valeurListeLangue = valeursListe;
-
 
343
			for (Iterator<String> it  = valeursListe.keySet().iterator(); it.hasNext();) {
-
 
344
				listeLangue.add(valeursListe.get(it.next()));
-
 
345
				listeLangue.sort("id_valeur", SortDir.ASC);
-
 
346
			}
-
 
347
			listeLangueChargee = true;
-
 
348
			
-
 
349
			if (mode.equals(MODE_MODIFIER)) {
-
 
350
				if (valeurListeLangue.get(projet.getLangue()) != null) {
-
 
351
					langueChp.setValue(valeurListeLangue.get(projet.getLangue()));
-
 
352
					langueChp.validate();
334
	private void rafraichirProjet(Projet proj) {
353
				}
335
		projet = proj;
354
			}
336
		peuplerFormulaire();
-
 
337
	}
355
		}
338
	
356
	}
339
	private Boolean etreValide() {
357
		
340
		Boolean valide = false;
358
	private Boolean etreValide() {
341
		GWT.log("formulaire"+formulaireValideOk+" - Projet :"+projetValideOk, null);
359
		Boolean valide = false;
Line 362... Line 380...
362
		}
380
		}
363
	}
381
	}
Line 364... Line 382...
364
	
382
	
365
	public boolean soumettreFormulaire() {
383
	public boolean soumettreFormulaire() {
366
		formulaireValideOk = verifierFormulaire();
-
 
367
		GWT.log("Form?"+formulaireValideOk, null);
384
		formulaireValideOk = verifierFormulaire();
368
		if (formulaireValideOk) {
385
		if (formulaireValideOk) {
369
			Projet projetCollecte = collecterProjet();
386
			Projet projetCollecte = collecterProjet();
370
			if (projetCollecte != null) {
-
 
371
				GWT.log("Info collectée ? ok", null);
387
			if (projetCollecte != null) {
372
				if (mode.equals(Formulaire.MODE_AJOUTER)) {
388
				if (mode.equals(Formulaire.MODE_AJOUTER)) {
373
					mediateur.ajouterProjet(this, projetCollecte);
389
					mediateur.ajouterProjet(this, projetCollecte);
374
				} else if (mode.equals(Formulaire.MODE_MODIFIER)) {
390
				} else if (mode.equals(Formulaire.MODE_MODIFIER)) {
375
					mediateur.modifierProjet(this, projetCollecte);
391
					mediateur.modifierProjet(this, projetCollecte);
Line 407... Line 423...
407
		if (uri != null && ! uri.trim().isEmpty() && ! uri.matches(Pattern.url)) {
423
		if (uri != null && ! uri.trim().isEmpty() && ! uri.matches(Pattern.url)) {
408
			messages.add("L'URL saisie n'est pas valide !");
424
			messages.add("L'URL saisie n'est pas valide !");
409
		}
425
		}
Line 410... Line 426...
410
		
426
		
-
 
427
		String heure = indexationHeureChp.getValue();
411
		String heure = indexationHeureChp.getValue();
428
		if (!UtilString.isEmpty(heure)) {
412
		if (heure != null && ! heure.isEmpty() && !heure.matches(Pattern.heureMinute)) {
429
			if (!heure.matches(Pattern.heureMinute)) {
413
			messages.add("L'heureMinute d'indexation saisie n'est pas valide !");
-
 
414
		} else {
-
 
415
			if(heure.matches(Pattern.heureMinute)) {
-
 
416
				heure += ":00";
430
				messages.add("L'heureMinute d'indexation saisie n'est pas valide !");
417
			}
431
			}
Line 418... Line 432...
418
		}
432
		}
419
		
433
		
Line 474... Line 488...
474
		
488
		
475
		doLayout(true);
489
		doLayout(true);
Line 476... Line 490...
476
	}
490
	}
477
	
-
 
478
	private Projet collecterProjet() {
491
	
Line 479... Line 492...
479
		Projet projetARetourner = new Projet();
492
	private Projet collecterProjet() {
480
		Projet projetCollecte = (Projet) projet.cloner(new Projet());
493
		Projet projetCollecte = (Projet) projet.cloner(new Projet());
481
		
494
		
482
		projetARetourner.setNom(nomChp.getValue());
495
		projetCollecte.setNom(nomChp.getValue());
483
		projetARetourner.setAbreviation(abreviationChp.getValue());
496
		projetCollecte.setAbreviation(abreviationChp.getValue());
484
		projetARetourner.setDescription(descriptionChp.getValue());
497
		projetCollecte.setDescription(descriptionChp.getValue());
485
		projetARetourner.setResume(resumeChp.getValue());
498
		projetCollecte.setResume(resumeChp.getValue());
486
		projetARetourner.setUrl(urlChp.getValue());
499
		projetCollecte.setUrl(urlChp.getValue());
487
		
500
		
488
		projetARetourner.setMotsCles(motsClesChp.getValue());
-
 
489
		projetARetourner.setCitation(citationChp.getValue());
501
		projetCollecte.setMotsCles(motsClesChp.getValue());
490
		projetARetourner.setLicence(licenceChp.getValue());
502
		projetCollecte.setCitation(citationChp.getValue());
491
		
503
		projetCollecte.setLicence(licenceChp.getValue());
-
 
504
		if (langueChp.getValue() != null) {
492
		if (markPublicChp.getValue()) {
505
			projetCollecte.setLangue(langueChp.getValue().getId());
-
 
506
		}
-
 
507
		String markPublic = (markPublicChp.getValue()) ? "1" : "0";
-
 
508
		projetCollecte.setMarkPublic(markPublic);
-
 
509
		
493
			projetCollecte.setMarkPublic("1");
510
		projetCollecte.setIndexationHeure(indexationHeureChp.getValue());
494
		} else {
-
 
495
			projetCollecte.setMarkPublic("0");
511
		if (indexationFrequenceChp.getValue() != null) {
496
		}
512
			projetCollecte.setIndexationFreq(indexationFrequenceChp.getValue().getId());
497
		
-
 
-
 
513
		}
498
		projetARetourner.setIndexationHeure(indexationHeureChp.getValue());
514
		if (indexationDureeChp.getValue() != null) {
-
 
515
			projetCollecte.setIndexationDuree(indexationDureeChp.getValue().getId());
499
		projetARetourner.setIndexationDuree(indexationDureeChp.getValue().getId());
516
		}
500
		projetARetourner.setIndexationFreq(indexationFrequenceChp.getValue().getId());
517
 
-
 
518
		Projet projetARetourner = null;
501
		
519
		if (!projetCollecte.comparer(projet)) {
502
		if (!projetCollecte.comparer(projet)) {
-
 
503
			projetARetourner = projet = projetCollecte;
-
 
504
		}
-
 
505
		
520
			projetARetourner = projet = projetCollecte;
506
		//GWT.log(projetARetourner.toString()+" "+projetARetourner., null)
521
			Debug.log(projetARetourner.toString());
Line 507... Line 522...
507
		
522
		}
508
		return projetARetourner;
523
		return projetARetourner;