Subversion Repositories eFlore/Applications.coel

Rev

Rev 376 | Rev 433 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 376 Rev 386
Line 19... Line 19...
19
import org.tela_botanica.client.modeles.Personne;
19
import org.tela_botanica.client.modeles.Personne;
20
import org.tela_botanica.client.modeles.PersonneListe;
20
import org.tela_botanica.client.modeles.PersonneListe;
21
import org.tela_botanica.client.modeles.Valeur;
21
import org.tela_botanica.client.modeles.Valeur;
22
import org.tela_botanica.client.modeles.ValeurListe;
22
import org.tela_botanica.client.modeles.ValeurListe;
Line 23... Line -...
23
 
-
 
24
 
23
 
25
import com.extjs.gxt.ui.client.Registry;
24
import com.extjs.gxt.ui.client.Registry;
26
import com.extjs.gxt.ui.client.Style.HorizontalAlignment;
25
import com.extjs.gxt.ui.client.Style.HorizontalAlignment;
27
import com.extjs.gxt.ui.client.Style.Scroll;
-
 
-
 
26
import com.extjs.gxt.ui.client.Style.Scroll;
28
import com.extjs.gxt.ui.client.binding.FieldBinding;
27
 
29
import com.extjs.gxt.ui.client.binding.FormBinding;
-
 
-
 
28
import com.extjs.gxt.ui.client.binding.FormBinding;
30
import com.extjs.gxt.ui.client.binding.SimpleComboBoxFieldBinding;
29
 
31
import com.extjs.gxt.ui.client.event.ComponentEvent;
30
import com.extjs.gxt.ui.client.event.ComponentEvent;
32
import com.extjs.gxt.ui.client.event.KeyListener;
31
import com.extjs.gxt.ui.client.event.KeyListener;
33
import com.extjs.gxt.ui.client.event.SelectionChangedEvent;
32
import com.extjs.gxt.ui.client.event.SelectionChangedEvent;
34
import com.extjs.gxt.ui.client.event.SelectionChangedListener;
33
import com.extjs.gxt.ui.client.event.SelectionChangedListener;
35
import com.extjs.gxt.ui.client.event.SelectionListener;
34
import com.extjs.gxt.ui.client.event.SelectionListener;
36
import com.extjs.gxt.ui.client.store.ListStore;
-
 
37
import com.extjs.gxt.ui.client.widget.ContentPanel;
35
import com.extjs.gxt.ui.client.store.ListStore;
38
import com.extjs.gxt.ui.client.widget.LayoutContainer;
36
import com.extjs.gxt.ui.client.widget.LayoutContainer;
Line -... Line 37...
-
 
37
import com.extjs.gxt.ui.client.widget.MessageBox;
39
import com.extjs.gxt.ui.client.widget.MessageBox;
38
 
40
 
39
import com.extjs.gxt.ui.client.widget.Info;
41
import com.extjs.gxt.ui.client.widget.TabItem;
40
import com.extjs.gxt.ui.client.widget.TabItem;
Line 42... Line 41...
42
import com.extjs.gxt.ui.client.widget.TabPanel;
41
import com.extjs.gxt.ui.client.widget.TabPanel;
Line 49... Line 48...
49
import com.extjs.gxt.ui.client.widget.form.DateField;
48
import com.extjs.gxt.ui.client.widget.form.DateField;
50
import com.extjs.gxt.ui.client.widget.form.FieldSet;
49
import com.extjs.gxt.ui.client.widget.form.FieldSet;
51
import com.extjs.gxt.ui.client.widget.form.FormPanel;
50
import com.extjs.gxt.ui.client.widget.form.FormPanel;
52
import com.extjs.gxt.ui.client.widget.form.HiddenField;
51
import com.extjs.gxt.ui.client.widget.form.HiddenField;
53
import com.extjs.gxt.ui.client.widget.form.LabelField;
52
import com.extjs.gxt.ui.client.widget.form.LabelField;
54
import com.extjs.gxt.ui.client.widget.form.SimpleComboBox;
-
 
55
import com.extjs.gxt.ui.client.widget.form.TextArea;
53
import com.extjs.gxt.ui.client.widget.form.TextArea;
56
import com.extjs.gxt.ui.client.widget.form.TextField;
54
import com.extjs.gxt.ui.client.widget.form.TextField;
57
import com.extjs.gxt.ui.client.widget.form.FormPanel.LabelAlign;
-
 
58
import com.extjs.gxt.ui.client.widget.layout.ColumnData;
55
import com.extjs.gxt.ui.client.widget.layout.ColumnData;
59
import com.extjs.gxt.ui.client.widget.layout.ColumnLayout;
56
import com.extjs.gxt.ui.client.widget.layout.ColumnLayout;
60
import com.extjs.gxt.ui.client.widget.layout.FitLayout;
57
import com.extjs.gxt.ui.client.widget.layout.FitLayout;
61
import com.extjs.gxt.ui.client.widget.layout.FlowLayout;
-
 
62
import com.extjs.gxt.ui.client.widget.layout.FormData;
58
import com.extjs.gxt.ui.client.widget.layout.FormData;
63
import com.extjs.gxt.ui.client.widget.layout.FormLayout;
59
import com.extjs.gxt.ui.client.widget.layout.FormLayout;
64
import com.extjs.gxt.ui.client.widget.layout.RowLayout;
60
import com.extjs.gxt.ui.client.widget.layout.RowLayout;
65
import com.extjs.gxt.ui.client.widget.layout.TableData;
-
 
66
import com.extjs.gxt.ui.client.widget.layout.TableLayout;
-
 
67
import com.extjs.gxt.ui.client.widget.toolbar.TextToolItem;
61
import com.extjs.gxt.ui.client.widget.toolbar.TextToolItem;
68
import com.extjs.gxt.ui.client.widget.toolbar.ToolBar;
62
import com.extjs.gxt.ui.client.widget.toolbar.ToolBar;
-
 
63
import com.google.gwt.core.client.GWT;
69
import com.google.gwt.i18n.client.DateTimeFormat;
64
import com.google.gwt.i18n.client.DateTimeFormat;
70
import com.google.gwt.user.client.Window;
-
 
71
import com.google.gwt.user.client.ui.Widget;
65
import com.google.gwt.user.client.ui.Widget;
Line 99... Line 93...
99
	 * Initialise le panneau et ajoute une barre d'outils à deux boutons (réinitialiser le 
93
	 * Initialise le panneau et ajoute une barre d'outils à deux boutons (réinitialiser le 
100
	 * formulaire et annuler la saisie). 
94
	 * formulaire et annuler la saisie). 
101
	 * 
95
	 * 
102
	 * */
96
	 * */
103
	public FormPersonneVue() {
97
	public FormPersonneVue() {
104
		initialiserComposants(null);
98
		initialiserComposants();
105
	}
99
	}
Line 106... Line -...
106
	
-
 
107
	public FormPersonneVue(Personne personne)	{
-
 
108
		
-
 
109
		initialiserComposants(personne);		
-
 
110
	}
-
 
111
	
100
	
Line 112... Line 101...
112
	public void initialiserComposants(Personne personne)	{
101
	public void initialiserComposants()	{
113
		
102
		
Line 114... Line 103...
114
		personneSelectionnee = new Personne();
103
		personneSelectionnee = new Personne();
Line 135... Line 124...
135
		creerComposantsIdentite();
124
		creerComposantsIdentite();
136
		creerComposantsAdresse();
125
		creerComposantsAdresse();
Line 137... Line 126...
137
		
126
		
Line 138... Line -...
138
		layout();
-
 
139
		
127
		layout();
Line 140... Line 128...
140
		rafraichir(personne);
128
		
Line 157... Line 145...
157
		
145
		
158
		setIconStyle("icone-form-ajouter");  
146
		setIconStyle("icone-form-ajouter");  
159
		setCollapsible(false);  
147
		setCollapsible(false);  
160
		setHeading("Ajouter une personne");
148
		setHeading("Ajouter une personne");
161
		setButtonAlign(HorizontalAlignment.CENTER);  
149
		setButtonAlign(HorizontalAlignment.CENTER);  
162
		setLayout(new FormLayout());
150
		setLayout(new FitLayout());
163
		setBodyBorder(false);
151
		setBodyBorder(false);
Line 164... Line 152...
164
		setBorders(false);
152
		setBorders(false);
Line 173... Line 161...
173
	 * 
161
	 * 
174
	 * */
162
	 * */
175
	public void initialiserOnglets()	{
163
	public void initialiserOnglets()	{
176
		//TabPanel
164
		//TabPanel
177
		TabPanel formulaireOnglets = new TabPanel();
165
		TabPanel formulaireOnglets = new TabPanel();
178
		formulaireOnglets.setBodyBorder(true);
-
 
Line 179... Line 166...
179
		
166
		
180
		
167
		
181
		//Tab 1 : identite
168
		//Tab 1 : identite
182
		tiIdentite = new TabItem("Identité");
169
		tiIdentite = new TabItem("Identité");
183
		tiIdentite.setLayout(new FormLayout());
170
		tiIdentite.setLayout(new FormLayout());
Line -... Line 171...
-
 
171
		tiIdentite.setScrollMode(Scroll.AUTO);
184
		tiIdentite.setScrollMode(Scroll.AUTO);
172
		formulaireOnglets.add(tiIdentite);
Line 185... Line 173...
185
		formulaireOnglets.add(tiIdentite);
173
		
186
		
174
		
Line 289... Line 277...
289
					mediateur.obtenirListeValeurEtRafraichir(this, "suffixes");
277
					mediateur.obtenirListeValeurEtRafraichir(this, "suffixes");
Line 290... Line 278...
290
			
278
			
291
					
279
					
-
 
280
					TextField<String> tfNomAutre = new TextField();
Line 292... Line 281...
292
					TextField<String> tfNomAutre = new TextField();
281
					tfNomAutre.setFieldLabel("Autres noms");
293
					tfNomAutre.setFieldLabel("Autres noms");
282
					tfNomAutre.setName("truk_nom_autre");
Line 294... Line 283...
294
					
283
					
Line 516... Line 505...
516
					fsContact.add(lfUrl);
505
					fsContact.add(lfUrl);
Line 517... Line 506...
517
			
506
			
518
					LayoutContainer lcUrl = new LayoutContainer(new ColumnLayout());
507
					LayoutContainer lcUrl = new LayoutContainer(new ColumnLayout());
Line -... Line 508...
-
 
508
					hmIdentite.put("lcUrl", lcUrl);
-
 
509
			
-
 
510
					HiddenField<String> hfUrl = new HiddenField<String>();
-
 
511
					hmIdentite.put("hfUrl", hfUrl);
519
					hmIdentite.put("lcUrl", lcUrl);
512
					add(hfUrl);
520
			
513
					
Line 521... Line 514...
521
						TextField tfUrl = new TextField();
514
						TextField tfUrl = new TextField();
522
						tfUrl.setValue("http://");
515
						tfUrl.setValue("http://");
Line 565... Line 558...
565
					formLayout = new FormLayout();
558
					formLayout = new FormLayout();
566
					formLayout.setLabelAlign(LabelAlign.LEFT);
559
					formLayout.setLabelAlign(LabelAlign.LEFT);
567
					fsAutresInfos.setLayout(formLayout); 
560
					fsAutresInfos.setLayout(formLayout); 
Line -... Line 561...
-
 
561
			
-
 
562
				
-
 
563
			formLayout = new FormLayout();
-
 
564
			formLayout.setLabelAlign(LabelAlign.TOP);
568
			
565
			LayoutContainer lcAutreInformations1 = new LayoutContainer(formLayout);
569
				
566
								
570
				//Civilité				
567
			//Civilité				
571
				ListStore<Valeur> storeSexe = new ListStore<Valeur>();
568
			ListStore<Valeur> storeSexe = new ListStore<Valeur>();
572
				ComboBox<Valeur> cbSexe = new ComboBox<Valeur>();
569
			ComboBox<Valeur> cbSexe = new ComboBox<Valeur>();
573
				cbSexe.setStore(storeSexe);
570
			cbSexe.setStore(storeSexe);
574
				cbSexe.setFieldLabel("Sexe");
571
			cbSexe.setFieldLabel("Sexe");
Line 575... Line 572...
575
				cbSexe.setDisplayField("nom");
572
			cbSexe.setDisplayField("nom");
576
				cbSexe.setEmptyText("Choisissez le sexe:");
573
			cbSexe.setEmptyText("Choisissez le sexe:");
Line 577... Line 574...
577
			
574
		
Line 578... Line 575...
578
				fsAutresInfos.add(cbSexe, fd100);			
575
			lcAutreInformations1.add(cbSexe, fd100);			
579
				hmIdentite.put("cbSexe", cbSexe);
576
			hmIdentite.put("cbSexe", cbSexe);
580
			
577
		
581
				mediateur.obtenirListeValeurEtRafraichir(this, "sexe");			
578
			mediateur.obtenirListeValeurEtRafraichir(this, "sexe");			
582
			
579
			
583
			//Description
580
			//Description
584
			TextArea taDescription = new TextArea();
-
 
Line -... Line 581...
-
 
581
			TextArea taDescription = new TextArea();
585
			taDescription.setEmptyText("Saisissez une description");
582
			taDescription.setEmptyText("Saisissez une description");
Line -... Line 583...
-
 
583
			taDescription.setFieldLabel("Description");
Line 586... Line 584...
586
			taDescription.setFieldLabel("Description");
584
			taDescription.setWidth("100%");
-
 
585
			taDescription.setName("description");
-
 
586
			
-
 
587
			lcAutreInformations1.add(taDescription, fd100);
-
 
588
			hmIdentite.put("taDescription", taDescription);
-
 
589
			
-
 
590
			fsAutresInfos.add(lcAutreInformations1);
-
 
591
			
-
 
592
			// Logo
-
 
593
			LayoutContainer lcAutreInformations2 = new LayoutContainer();
-
 
594
			hmIdentite.put("lcAutreInformations2", lcAutreInformations2);
-
 
595
			
-
 
596
			LabelField lfUrlLogo = new LabelField();
-
 
597
			lfUrlLogo.setText("<b>Logo:</b>");
-
 
598
			lcAutreInformations2.add(lfUrlLogo);
-
 
599
			
-
 
600
			LayoutContainer lcUrlLogo = new LayoutContainer(new ColumnLayout());
-
 
601
			hmIdentite.put("lcUrlLogo", lcUrlLogo);
-
 
602
	
-
 
603
				TextField tfUrlLogo = new TextField();
-
 
604
				tfUrlLogo.setValue("http://");
-
 
605
				
-
 
606
				HiddenField<String> hfUrlLogo = new HiddenField<String>();
-
 
607
				hmIdentite.put("hfUrlLogo", hfUrlLogo);
-
 
608
	
-
 
609
				lcUrlLogo.add(tfUrlLogo, new ColumnData(0.8));
-
 
610
				hmIdentite.put("tfUrlLogo", tfUrlLogo);
-
 
611
	
-
 
612
				IconButton ibAjouterUrlLogo = new IconButton(ComposantClass.ICONE_AJOUTER);
-
 
613
				ibAjouterUrlLogo.addSelectionListener(new SelectionListener<ComponentEvent>() {
-
 
614
 
-
 
615
					public void componentSelected(ComponentEvent ce) {
-
 
616
						
-
 
617
						TextField<String> tfUrlLogo = (TextField) hmIdentite.get("tfUrlLogo");
-
 
618
						String strUrl = tfUrlLogo.getValue();
-
 
619
						
-
 
620
						if ((strUrl == null)||(strUrl.trim().equals("http://"))||(strUrl.trim().equals("")))	{
-
 
621
							MessageBox.alert("Erreur de saisie", "Vous devez saisir un URL", null);
-
 
622
						} else if(hmIdentite.get("url-" + strUrl) != null)	{
-
 
623
							MessageBox.alert("Erreur de saisie", "L'url est déjà présente dans la liste.", null);
-
 
624
						}	else	{
-
 
625
							tfUrlLogo.setValue("");
-
 
626
								if (!strUrl.matches("[a-z]{3,}://[a-z0-9-]+.[.a-z0-9-]+(?::[0-9]*)?"))	{
-
 
627
									MessageBox.alert("Erreur de saisie", "L'adresse n'est pas au bon format (ex: http://www.domain.com)", null);			
-
 
628
								} else if (strUrl.length()>255){
-
 
629
									MessageBox.alert("Erreur de saisie", "L'adresse ne peut dépasser 255 caractères", null);
-
 
630
								} else {
-
 
631
									ajouterUrlLogo(strUrl);
-
 
632
								}
-
 
633
							
-
 
634
						}
-
 
635
						
587
			taDescription.setWidth("100%");
636
					}
588
			taDescription.setName("description");
637
				});
589
			fsAutresInfos.add(taDescription, fd100);
638
	
590
			
639
				lcUrlLogo.add(ibAjouterUrlLogo, new ColumnData(0.15));
591
			hmIdentite.put("taDescription", taDescription);
640
				lcAutreInformations2.add(lcUrlLogo);
Line 592... Line 641...
592
			
641
			
Line 593... Line 642...
593
			
642
			fsAutresInfos.add(lcAutreInformations2);
Line 809... Line 858...
809
	/*---------------------------------------------------------------------------------------
858
	/*---------------------------------------------------------------------------------------
810
	 * 		RAFRAICHISSEMENT DU PANNEAU
859
	 * 		RAFRAICHISSEMENT DU PANNEAU
811
	 * --------------------------------------------------------------------------------------
860
	 * --------------------------------------------------------------------------------------
812
	 */	
861
	 */	
813
	public void rafraichir(Object nouvellesDonnees) {
862
	public void rafraichir(Object nouvellesDonnees) {
-
 
863
		
-
 
864
		
-
 
865
		
814
		if (nouvellesDonnees instanceof ValeurListe){
866
		if (nouvellesDonnees instanceof ValeurListe){
Line 815... Line 867...
815
			
867
			
Line 854... Line 906...
854
			}
906
			}
Line 855... Line 907...
855
			
907
			
Line 856... Line -...
856
			
-
 
857
		} else if (nouvellesDonnees instanceof Information)	{
908
			
-
 
909
		} else if (nouvellesDonnees instanceof Information)	{
-
 
910
			
-
 
911
			Information info = (Information) nouvellesDonnees;
-
 
912
			if (info.getType().equals("ajout_personne"))	{
-
 
913
				
-
 
914
				personneSelectionnee.set("id_personne", info.toString());
-
 
915
				GWT.log("Ajout de la personne " + personneSelectionnee.getId(), null);
-
 
916
				
-
 
917
				Info.display("Enregistrement", "Les modifications apportées à la personne " + personneSelectionnee.getId() + " ont été enregistrées");
-
 
918
				//Passer en mode modifier
-
 
919
				
-
 
920
			} else if (info.getType().equals("suppression_personne"))	{
Line 858... Line -...
858
			
-
 
Line 859... Line 921...
859
			
921
				GWT.log(info.toString(), null);
860
			Information info = (Information) nouvellesDonnees;
922
				Info.display("lk", info.getMessages().toString());
861
			
923
			} else if (info.getDonnee(0) instanceof PersonneListe)	{
Line 862... Line 924...
862
			if (info.getDonnee(0) instanceof PersonneListe)	{
924
			
863
			
925
			
Line 864... Line -...
864
				Collection colPersonneListe = ((PersonneListe) info.getDonnee(0)).values();
-
 
865
				Iterator itPersonneListe = colPersonneListe.iterator();
-
 
866
				Personne personne = (Personne) itPersonneListe.next();
926
					Collection colPersonneListe = ((PersonneListe) info.getDonnee(0)).values();
867
				
927
					Iterator itPersonneListe = colPersonneListe.iterator();
868
				personneSauvegarde = new Personne();
928
					Personne personne = (Personne) itPersonneListe.next();
Line 1035... Line 1095...
1035
				
1095
					
1036
				//Ville
1096
					//Ville
Line -... Line 1097...
-
 
1097
					((TextField) hmAdresse.get("tfVille")).setValue(personne.get("ville"));
-
 
1098
					
1037
				((TextField) hmAdresse.get("tfVille")).setValue(personne.get("ville"));
1099
					
1038
				
1100
				} else {
Line 1039... Line 1101...
1039
				
1101
					Info.display("messages", info.getMessages().toString());
1040
			}
1102
				}
Line 1268... Line 1330...
1268
				LayoutContainer lcUrl = (LayoutContainer) hmIdentite.get("lc-" + strUrl);
1330
				LayoutContainer lcUrl = (LayoutContainer) hmIdentite.get("lc-" + strUrl);
1269
				LayoutContainer lcUrlContainer  = (LayoutContainer) hmIdentite.get("lcUrlContainer");
1331
				LayoutContainer lcUrlContainer  = (LayoutContainer) hmIdentite.get("lcUrlContainer");
Line 1270... Line 1332...
1270
				
1332
				
Line -... Line 1333...
-
 
1333
				lcUrlContainer.remove(lcUrl);
-
 
1334
				
-
 
1335
				
-
 
1336
				HiddenField<String> hfUrl = (HiddenField<String>) hmIdentite.get("hfUrl");
-
 
1337
				String strValeurUrl = hfUrl.getValue();
-
 
1338
				strValeurUrl = strValeurUrl.replace(strUrl, "");
-
 
1339
				hfUrl.setValue(strValeurUrl);
-
 
1340
				
-
 
1341
			}
-
 
1342
		});
-
 
1343
		
-
 
1344
		lcUrl.add(ibSupprimerUrl, new ColumnData(0.15));
-
 
1345
		lcUrlContainer.add(lcUrl);
-
 
1346
		
-
 
1347
		HiddenField<String> hfUrl = (HiddenField<String>) hmIdentite.get("hfUrl");
-
 
1348
		String strValeurUrl = hfUrl.getValue();
-
 
1349
		if (strValeurUrl == null)	{
-
 
1350
			strValeurUrl = "";
-
 
1351
		}
-
 
1352
		
-
 
1353
		strValeurUrl += strUrl + ";;";
-
 
1354
		hfUrl.setValue(strValeurUrl);
-
 
1355
		
-
 
1356
		layout();
-
 
1357
		
-
 
1358
		
-
 
1359
		
-
 
1360
	}
-
 
1361
	
-
 
1362
	public void ajouterUrlLogo(String strUrl)	{
-
 
1363
		
-
 
1364
		LayoutContainer lcUrlContainer  = (LayoutContainer) hmIdentite.get("lcAutreInformations2");
-
 
1365
		
-
 
1366
		LayoutContainer lcUrl = new LayoutContainer();
-
 
1367
		lcUrl.setLayout(new ColumnLayout());
-
 
1368
		hmIdentite.put("lc-" + strUrl, lcUrl);
-
 
1369
		
-
 
1370
		
-
 
1371
		Text tUrl = new Text(strUrl);
-
 
1372
		hmIdentite.put("url-"+strUrl, tUrl);
-
 
1373
		
-
 
1374
		lcUrl.add(tUrl, new ColumnData(0.8));
-
 
1375
		
-
 
1376
		IconButton ibSupprimerUrl = new IconButton(ComposantClass.ICONE_SUPPRIMER);
-
 
1377
		ibSupprimerUrl.setId(strUrl);
-
 
1378
		ibSupprimerUrl.addSelectionListener(new SelectionListener<ComponentEvent>() {
-
 
1379
 
-
 
1380
			public void componentSelected(ComponentEvent ce) {
-
 
1381
				
-
 
1382
				//Suppression url
-
 
1383
				String strUrl = ce.component.getId();
-
 
1384
				LayoutContainer lcUrl = (LayoutContainer) hmIdentite.get("lc-" + strUrl);
-
 
1385
				LayoutContainer lcUrlContainer  = (LayoutContainer) hmIdentite.get("lcAutreInformations2");
-
 
1386
				
-
 
1387
				lcUrlContainer.remove(lcUrl);
-
 
1388
				
-
 
1389
				
-
 
1390
				HiddenField<String> hfUrlLogo = (HiddenField<String>) hmIdentite.get("hfUrlLogo");
-
 
1391
				String strValeurUrl = hfUrlLogo.getValue();
-
 
1392
				strValeurUrl = strUrl.replace(strUrl, "");
-
 
1393
				
1271
				lcUrlContainer.remove(lcUrl);
1394
				hfUrlLogo.setValue(strValeurUrl);
1272
				
1395
				
Line 1273... Line 1396...
1273
			}
1396
			}
1274
		});
1397
		});
Line -... Line 1398...
-
 
1398
		
-
 
1399
		lcUrl.add(ibSupprimerUrl, new ColumnData(0.15));
-
 
1400
		lcUrlContainer.add(lcUrl);
-
 
1401
		
-
 
1402
		HiddenField<String> hfUrlLogo = (HiddenField<String>) hmIdentite.get("hfUrlLogo");
-
 
1403
		String strValeurUrl = hfUrlLogo.getValue();
-
 
1404
		if (strValeurUrl == null)	{
-
 
1405
			strValeurUrl = "";
-
 
1406
		}
-
 
1407
		
-
 
1408
		strValeurUrl += strUrl + ";;";
-
 
1409
		
1275
		
1410
		hfUrlLogo.setValue(strValeurUrl);
Line 1276... Line 1411...
1276
		lcUrl.add(ibSupprimerUrl, new ColumnData(0.15));
1411
		
Line 1338... Line 1473...
1338
		strValeur = obtenirValeurCombo("cbSuffixe"); 
1473
		strValeur = obtenirValeurCombo("cbSuffixe"); 
1339
		personneSelectionnee.set("ce_truk_suffix", strValeur);
1474
		personneSelectionnee.set("ce_truk_suffix", strValeur);
Line 1340... Line 1475...
1340
		
1475
		
Line -... Line 1476...
-
 
1476
		personneSelectionnee.set("truk_courriel", ((HiddenField<String>) hmIdentite.get("hfHiddenCourriel")).getValue());
-
 
1477
		
-
 
1478
		
1341
		personneSelectionnee.set("truk_courriel", ((HiddenField<String>) hmIdentite.get("hfHiddenCourriel")).getValue());
1479
		//Pour le nom complet, on enregistre dans la bdd la valeur du prefixe/suffixe et non l'id
-
 
1480
		String strPrefixe = "";
-
 
1481
		combo = (ComboBox) hmIdentite.get("cbPrefixe");
-
 
1482
		valeur = (Valeur) combo.getValue();
-
 
1483
		if (valeur != null)	{
-
 
1484
			strPrefixe = valeur.getNom();
-
 
1485
		} else {
-
 
1486
			strPrefixe = combo.getRawValue();
-
 
1487
		}
-
 
1488
		
-
 
1489
		String strSuffixe = "";
-
 
1490
		combo = (ComboBox) hmIdentite.get("cbSuffixe");
-
 
1491
		valeur = (Valeur) combo.getValue();
-
 
1492
		if (valeur != null)	{
-
 
1493
			strSuffixe = valeur.getNom();
-
 
1494
		} else {
-
 
1495
			strSuffixe = combo.getRawValue();
1342
		
1496
		}
1343
		strValeur = personneSelectionnee.get("truk_prefix")
1497
		strValeur = strPrefixe
1344
					+ " " + personneSelectionnee.get("prenom")
1498
					+ " " + personneSelectionnee.get("prenom")
Line 1345... Line 1499...
1345
					+ " " + personneSelectionnee.get("nom")
1499
					+ " " + personneSelectionnee.get("nom")
Line 1346... Line 1500...
1346
					+ " " + personneSelectionnee.get("truk_suffix");
1500
					+ " " + strSuffixe;
Line 1356... Line 1510...
1356
		strValeur = obtenirValeurCombo("cbRegion");
1510
		strValeur = obtenirValeurCombo("cbRegion");
1357
		personneSelectionnee.set("region", strValeur);
1511
		personneSelectionnee.set("region", strValeur);
Line 1358... Line 1512...
1358
		
1512
		
Line -... Line 1513...
-
 
1513
		personneSelectionnee.set("truk_telephone", ((HiddenField<String>) hmIdentite.get("hfTelephone")).getValue());
-
 
1514
		
-
 
1515
		String logoUrls = ((HiddenField<String>) hmIdentite.get("hfUrlLogo")).getValue();
-
 
1516
		if (logoUrls == null)	{
-
 
1517
			logoUrls = "";
Line 1359... Line 1518...
1359
		personneSelectionnee.set("truk_telephone", ((HiddenField<String>) hmIdentite.get("hfTelephone")).getValue());
1518
		}
1360
		
-
 
1361
		
-
 
1362
		System.out.println(personneSelectionnee);
-
 
1363
		
-
 
1364
		//tel
-
 
Line -... Line 1519...
-
 
1519
		personneSelectionnee.set("truk_logo", logoUrls);
-
 
1520
		
-
 
1521
		personneSelectionnee.set("truk_url", ((HiddenField) hmIdentite.get("hfUrl")).getValue());
-
 
1522
		
-
 
1523
		//if (lstMessageErreur.size() < 0)	{
-
 
1524
			mediateur.enregistrerPersonne(this, personneSelectionnee);
-
 
1525
		/*} else {
-
 
1526
			String strMessagesErreur = "";
Line -... Line 1527...
-
 
1527
			Iterator<String> itMessagesErreur = lstMessageErreur.iterator();
-
 
1528
			while (itMessagesErreur.hasNext())	{
1365
		//fax
1529
				strMessagesErreur += " - " + itMessagesErreur.next() +" \n";
Line 1366... Line 1530...
1366
		//logo
1530
			}
Line 1367... Line 1531...
1367
		//url
1531