1 |
package org.tela_botanica.client.vues.collection;
|
1 |
package org.tela_botanica.client.vues.collection;
|
2 |
|
2 |
|
3 |
import java.util.ArrayList;
|
3 |
import java.util.ArrayList;
|
4 |
import java.util.HashMap;
|
4 |
import java.util.HashMap;
|
5 |
import java.util.List;
|
5 |
import java.util.List;
|
6 |
|
6 |
|
7 |
import org.tela_botanica.client.Mediateur;
|
7 |
import org.tela_botanica.client.Mediateur;
|
8 |
import org.tela_botanica.client.composants.ChampComboBoxMultiSelect;
|
8 |
import org.tela_botanica.client.composants.ChampComboBoxMultiSelect;
|
9 |
import org.tela_botanica.client.composants.ChampComboBoxRechercheTempsReelPaginable;
|
9 |
import org.tela_botanica.client.composants.ChampComboBoxRechercheTempsReelPaginable;
|
10 |
import org.tela_botanica.client.composants.GrillePaginable;
|
10 |
import org.tela_botanica.client.composants.GrillePaginable;
|
11 |
import org.tela_botanica.client.composants.InfoLogger;
|
11 |
import org.tela_botanica.client.composants.InfoLogger;
|
12 |
import org.tela_botanica.client.composants.pagination.ProxyCollectionACommentaire;
|
12 |
import org.tela_botanica.client.composants.pagination.ProxyCollectionACommentaire;
|
13 |
import org.tela_botanica.client.composants.pagination.ProxyCollectionAPersonne;
|
13 |
import org.tela_botanica.client.composants.pagination.ProxyCollectionAPersonne;
|
14 |
import org.tela_botanica.client.composants.pagination.ProxyCommentaires;
|
14 |
import org.tela_botanica.client.composants.pagination.ProxyCommentaires;
|
15 |
import org.tela_botanica.client.composants.pagination.ProxyPublications;
|
15 |
import org.tela_botanica.client.composants.pagination.ProxyPublications;
|
16 |
import org.tela_botanica.client.images.Images;
|
16 |
import org.tela_botanica.client.images.Images;
|
17 |
import org.tela_botanica.client.interfaces.Rafraichissable;
|
17 |
import org.tela_botanica.client.interfaces.Rafraichissable;
|
18 |
import org.tela_botanica.client.modeles.Information;
|
18 |
import org.tela_botanica.client.modeles.Information;
|
19 |
import org.tela_botanica.client.modeles.Valeur;
|
19 |
import org.tela_botanica.client.modeles.Valeur;
|
20 |
import org.tela_botanica.client.modeles.ValeurListe;
|
20 |
import org.tela_botanica.client.modeles.ValeurListe;
|
21 |
import org.tela_botanica.client.modeles.aDonnee;
|
21 |
import org.tela_botanica.client.modeles.aDonnee;
|
22 |
import org.tela_botanica.client.modeles.collection.Collection;
|
22 |
import org.tela_botanica.client.modeles.collection.Collection;
|
23 |
import org.tela_botanica.client.modeles.collection.CollectionACommentaire;
|
23 |
import org.tela_botanica.client.modeles.collection.CollectionACommentaire;
|
24 |
import org.tela_botanica.client.modeles.collection.CollectionACommentaireListe;
|
24 |
import org.tela_botanica.client.modeles.collection.CollectionACommentaireListe;
|
25 |
import org.tela_botanica.client.modeles.commentaire.Commentaire;
|
25 |
import org.tela_botanica.client.modeles.commentaire.Commentaire;
|
26 |
import org.tela_botanica.client.modeles.commentaire.CommentaireListe;
|
26 |
import org.tela_botanica.client.modeles.commentaire.CommentaireListe;
|
27 |
import org.tela_botanica.client.modeles.publication.Publication;
|
27 |
import org.tela_botanica.client.modeles.publication.Publication;
|
28 |
import org.tela_botanica.client.synchronisation.Sequenceur;
|
28 |
import org.tela_botanica.client.synchronisation.Sequenceur;
|
29 |
import org.tela_botanica.client.util.Debug;
|
29 |
import org.tela_botanica.client.util.Debug;
|
30 |
import org.tela_botanica.client.vues.FenetreForm;
|
30 |
import org.tela_botanica.client.vues.FenetreForm;
|
31 |
import org.tela_botanica.client.vues.Formulaire;
|
31 |
import org.tela_botanica.client.vues.Formulaire;
|
32 |
import org.tela_botanica.client.vues.FormulaireBarreValidation;
|
32 |
import org.tela_botanica.client.vues.FormulaireBarreValidation;
|
33 |
import org.tela_botanica.client.vues.FormulaireOnglet;
|
33 |
import org.tela_botanica.client.vues.FormulaireOnglet;
|
34 |
import org.tela_botanica.client.vues.commentaire.CommentaireForm;
|
34 |
import org.tela_botanica.client.vues.commentaire.CommentaireForm;
|
35 |
|
35 |
|
36 |
import com.extjs.gxt.ui.client.Style.SortDir;
|
36 |
import com.extjs.gxt.ui.client.Style.SortDir;
|
37 |
import com.extjs.gxt.ui.client.data.ModelData;
|
37 |
import com.extjs.gxt.ui.client.data.ModelData;
|
38 |
import com.extjs.gxt.ui.client.data.ModelType;
|
38 |
import com.extjs.gxt.ui.client.data.ModelType;
|
39 |
import com.extjs.gxt.ui.client.event.BaseEvent;
|
39 |
import com.extjs.gxt.ui.client.event.BaseEvent;
|
40 |
import com.extjs.gxt.ui.client.event.ButtonEvent;
|
40 |
import com.extjs.gxt.ui.client.event.ButtonEvent;
|
41 |
import com.extjs.gxt.ui.client.event.ComponentEvent;
|
41 |
import com.extjs.gxt.ui.client.event.ComponentEvent;
|
42 |
import com.extjs.gxt.ui.client.event.Events;
|
42 |
import com.extjs.gxt.ui.client.event.Events;
|
43 |
import com.extjs.gxt.ui.client.event.KeyListener;
|
43 |
import com.extjs.gxt.ui.client.event.KeyListener;
|
44 |
import com.extjs.gxt.ui.client.event.Listener;
|
44 |
import com.extjs.gxt.ui.client.event.Listener;
|
45 |
import com.extjs.gxt.ui.client.event.SelectionListener;
|
45 |
import com.extjs.gxt.ui.client.event.SelectionListener;
|
46 |
import com.extjs.gxt.ui.client.store.ListStore;
|
46 |
import com.extjs.gxt.ui.client.store.ListStore;
|
47 |
import com.extjs.gxt.ui.client.store.Store;
|
47 |
import com.extjs.gxt.ui.client.store.Store;
|
48 |
import com.extjs.gxt.ui.client.store.StoreEvent;
|
48 |
import com.extjs.gxt.ui.client.store.StoreEvent;
|
49 |
import com.extjs.gxt.ui.client.widget.ContentPanel;
|
49 |
import com.extjs.gxt.ui.client.widget.ContentPanel;
|
50 |
import com.extjs.gxt.ui.client.widget.Info;
|
50 |
import com.extjs.gxt.ui.client.widget.Info;
|
51 |
import com.extjs.gxt.ui.client.widget.Text;
|
51 |
import com.extjs.gxt.ui.client.widget.Text;
|
52 |
import com.extjs.gxt.ui.client.widget.button.Button;
|
52 |
import com.extjs.gxt.ui.client.widget.button.Button;
|
53 |
import com.extjs.gxt.ui.client.widget.button.ButtonBar;
|
53 |
import com.extjs.gxt.ui.client.widget.button.ButtonBar;
|
54 |
import com.extjs.gxt.ui.client.widget.form.ComboBox;
|
54 |
import com.extjs.gxt.ui.client.widget.form.ComboBox;
|
55 |
import com.extjs.gxt.ui.client.widget.form.Field;
|
55 |
import com.extjs.gxt.ui.client.widget.form.Field;
|
56 |
import com.extjs.gxt.ui.client.widget.form.FormPanel;
|
56 |
import com.extjs.gxt.ui.client.widget.form.FormPanel;
|
57 |
import com.extjs.gxt.ui.client.widget.form.Validator;
|
57 |
import com.extjs.gxt.ui.client.widget.form.Validator;
|
58 |
import com.extjs.gxt.ui.client.widget.form.ComboBox.TriggerAction;
|
58 |
import com.extjs.gxt.ui.client.widget.form.ComboBox.TriggerAction;
|
59 |
import com.extjs.gxt.ui.client.widget.grid.CellEditor;
|
59 |
import com.extjs.gxt.ui.client.widget.grid.CellEditor;
|
60 |
import com.extjs.gxt.ui.client.widget.grid.ColumnConfig;
|
60 |
import com.extjs.gxt.ui.client.widget.grid.ColumnConfig;
|
61 |
import com.extjs.gxt.ui.client.widget.grid.ColumnData;
|
61 |
import com.extjs.gxt.ui.client.widget.grid.ColumnData;
|
62 |
import com.extjs.gxt.ui.client.widget.grid.ColumnModel;
|
62 |
import com.extjs.gxt.ui.client.widget.grid.ColumnModel;
|
63 |
import com.extjs.gxt.ui.client.widget.grid.EditorGrid;
|
63 |
import com.extjs.gxt.ui.client.widget.grid.EditorGrid;
|
64 |
import com.extjs.gxt.ui.client.widget.grid.Grid;
|
64 |
import com.extjs.gxt.ui.client.widget.grid.Grid;
|
65 |
import com.extjs.gxt.ui.client.widget.grid.GridCellRenderer;
|
65 |
import com.extjs.gxt.ui.client.widget.grid.GridCellRenderer;
|
66 |
import com.extjs.gxt.ui.client.widget.grid.GridSelectionModel;
|
66 |
import com.extjs.gxt.ui.client.widget.grid.GridSelectionModel;
|
67 |
import com.extjs.gxt.ui.client.widget.grid.HeaderGroupConfig;
|
67 |
import com.extjs.gxt.ui.client.widget.grid.HeaderGroupConfig;
|
68 |
import com.extjs.gxt.ui.client.widget.grid.RowNumberer;
|
68 |
import com.extjs.gxt.ui.client.widget.grid.RowNumberer;
|
69 |
import com.extjs.gxt.ui.client.widget.layout.FitLayout;
|
69 |
import com.extjs.gxt.ui.client.widget.layout.FitLayout;
|
70 |
import com.extjs.gxt.ui.client.widget.toolbar.SeparatorToolItem;
|
70 |
import com.extjs.gxt.ui.client.widget.toolbar.SeparatorToolItem;
|
71 |
import com.extjs.gxt.ui.client.widget.toolbar.ToolBar;
|
71 |
import com.extjs.gxt.ui.client.widget.toolbar.ToolBar;
|
72 |
import com.google.gwt.core.client.GWT;
|
72 |
import com.google.gwt.core.client.GWT;
|
73 |
|
73 |
|
74 |
public class CollectionFormCommentaire extends FormulaireOnglet implements Rafraichissable {
|
74 |
public class CollectionFormCommentaire extends FormulaireOnglet implements Rafraichissable {
|
75 |
|
75 |
|
76 |
public static final String ID = "commentaire";
|
76 |
public static final String ID = "commentaire";
|
77 |
private Collection collection = null;
|
77 |
private Collection collection = null;
|
78 |
private static int idGenere = 1;
|
78 |
private static int idGenere = 1;
|
79 |
|
79 |
|
80 |
private ContentPanel panneauPrincipal = null;
|
80 |
private ContentPanel panneauPrincipal = null;
|
81 |
private ToolBar barreOutils = null;
|
81 |
private ToolBar barreOutils = null;
|
82 |
private GrillePaginable<ModelData> grille = null;
|
82 |
private GrillePaginable<ModelData> grille = null;
|
83 |
private ChampComboBoxMultiSelect<Valeur> typeCombo = null;
|
83 |
private ChampComboBoxMultiSelect<Valeur> typeCombo = null;
|
84 |
|
84 |
|
85 |
private CollectionACommentaireListe commentairesAjoutes = null;
|
85 |
private CollectionACommentaireListe commentairesAjoutes = null;
|
86 |
private CollectionACommentaireListe commentairesModifies = null;
|
86 |
private CollectionACommentaireListe commentairesModifies = null;
|
87 |
private CollectionACommentaireListe commentairesSupprimes = null;
|
87 |
private CollectionACommentaireListe commentairesSupprimes = null;
|
88 |
private ChampComboBoxRechercheTempsReelPaginable commentairesSaisisComboBox = null;
|
88 |
private ChampComboBoxRechercheTempsReelPaginable commentairesSaisisComboBox = null;
|
89 |
private Button commentairesBoutonSupprimer = null;
|
89 |
private Button commentairesBoutonSupprimer = null;
|
90 |
private Button commentairesBoutonModifier = null;
|
90 |
private Button commentairesBoutonModifier = null;
|
91 |
|
91 |
|
92 |
private static boolean chargementTypesOk = false;
|
92 |
private static boolean chargementTypesOk = false;
|
93 |
private static boolean chargementCommentairesOk = false;
|
93 |
private static boolean chargementCommentairesOk = false;
|
94 |
|
94 |
|
95 |
private FenetreForm fenetreFormulaire = null;
|
95 |
private FenetreForm fenetreFormulaire = null;
|
96 |
private Sequenceur sequenceur;
|
96 |
private Sequenceur sequenceur;
|
97 |
|
97 |
|
98 |
public CollectionFormCommentaire(Formulaire formulaireCourrant) {
|
98 |
public CollectionFormCommentaire(Formulaire formulaireCourrant) {
|
99 |
|
99 |
|
100 |
initialiserOnglet(formulaireCourrant);
|
100 |
initialiserOnglet(formulaireCourrant);
|
101 |
setLayout(new FitLayout());
|
101 |
setLayout(new FitLayout());
|
102 |
setId(ID);
|
102 |
setId(ID);
|
103 |
setText(Mediateur.i18nC.collectionCommentaire());
|
103 |
setText(Mediateur.i18nC.collectionCommentaire());
|
104 |
setStyleAttribute("padding", "0");
|
104 |
setStyleAttribute("padding", "0");
|
105 |
|
105 |
|
106 |
initialiser();
|
106 |
initialiser();
|
107 |
|
107 |
|
108 |
panneauPrincipal = creerPanneauContenantGrille();
|
108 |
panneauPrincipal = creerPanneauContenantGrille();
|
109 |
barreOutils = creerBarreOutilsGrille();
|
109 |
barreOutils = creerBarreOutilsGrille();
|
110 |
panneauPrincipal.setTopComponent(barreOutils);
|
110 |
panneauPrincipal.setTopComponent(barreOutils);
|
111 |
grille = creerGrille();
|
111 |
grille = creerGrille();
|
112 |
panneauPrincipal.add(grille);
|
112 |
panneauPrincipal.add(grille);
|
113 |
|
113 |
|
114 |
mediateur.obtenirListeValeurEtRafraichir(this, "typeCommentaireCollection", null);
|
114 |
mediateur.obtenirListeValeurEtRafraichir(this, "typeCommentaireCollection", null);
|
115 |
add(panneauPrincipal);
|
115 |
add(panneauPrincipal);
|
116 |
}
|
116 |
}
|
117 |
|
117 |
|
118 |
private void initialiser() {
|
118 |
private void initialiser() {
|
119 |
// Remise à zéro des modification dans la liste des commentaires
|
119 |
// Remise à zéro des modification dans la liste des commentaires
|
120 |
initialiserGestionCommentaires();
|
120 |
initialiserGestionCommentaires();
|
121 |
|
121 |
|
122 |
collection = ((CollectionForm) formulaire).collection;
|
122 |
collection = ((CollectionForm) formulaire).collection;
|
123 |
}
|
123 |
}
|
124 |
|
124 |
|
125 |
private void initialiserGestionCommentaires() {
|
125 |
private void initialiserGestionCommentaires() {
|
126 |
idGenere = 1;
|
126 |
idGenere = 1;
|
127 |
commentairesAjoutes = new CollectionACommentaireListe();
|
127 |
commentairesAjoutes = new CollectionACommentaireListe();
|
128 |
commentairesModifies = new CollectionACommentaireListe();
|
128 |
commentairesModifies = new CollectionACommentaireListe();
|
129 |
commentairesSupprimes = new CollectionACommentaireListe();
|
129 |
commentairesSupprimes = new CollectionACommentaireListe();
|
130 |
}
|
130 |
}
|
131 |
|
131 |
|
132 |
private void initialiserChargement() {
|
132 |
private void initialiserChargement() {
|
133 |
chargementCommentairesOk = false;
|
133 |
chargementCommentairesOk = false;
|
134 |
}
|
134 |
}
|
135 |
|
135 |
|
136 |
private ContentPanel creerPanneauContenantGrille() {
|
136 |
private ContentPanel creerPanneauContenantGrille() {
|
137 |
ContentPanel panneau = new ContentPanel();
|
137 |
ContentPanel panneau = new ContentPanel();
|
138 |
|
138 |
|
139 |
panneau.setHeadingHtml(i18nC.collectionCommentaireTitre());
|
139 |
panneau.setHeadingHtml(i18nC.collectionCommentaireTitre());
|
140 |
panneau.setIcon(Images.ICONES.table());
|
140 |
panneau.setIcon(Images.ICONES.table());
|
141 |
panneau.setLayout(new FitLayout());
|
141 |
panneau.setLayout(new FitLayout());
|
142 |
panneau.setFrame(true);
|
142 |
panneau.setFrame(true);
|
143 |
|
143 |
|
144 |
return panneau;
|
144 |
return panneau;
|
145 |
}
|
145 |
}
|
146 |
|
146 |
|
147 |
private ToolBar creerBarreOutilsGrille() {
|
147 |
private ToolBar creerBarreOutilsGrille() {
|
148 |
ToolBar barreOutils = new ToolBar();
|
148 |
ToolBar barreOutils = new ToolBar();
|
149 |
|
- |
|
150 |
Button ajouterPersonneBouton = creerBoutonAjouter();
|
- |
|
151 |
barreOutils.add(ajouterPersonneBouton);
|
- |
|
152 |
|
- |
|
153 |
barreOutils.add(new Text(" ou "));
|
- |
|
154 |
|
149 |
|
155 |
commentairesSaisisComboBox = creerComboBoxCommentairesSaisies();
|
150 |
commentairesSaisisComboBox = creerComboBoxCommentairesSaisies();
|
156 |
barreOutils.add(commentairesSaisisComboBox);
|
151 |
barreOutils.add(commentairesSaisisComboBox);
|
- |
|
152 |
|
- |
|
153 |
barreOutils.add(new Text(" ou "));
|
- |
|
154 |
|
- |
|
155 |
Button ajouterPersonneBouton = creerBoutonAjouter();
|
- |
|
156 |
barreOutils.add(ajouterPersonneBouton);
|
157 |
|
157 |
|
158 |
barreOutils.add(new SeparatorToolItem());
|
158 |
barreOutils.add(new SeparatorToolItem());
|
159 |
|
159 |
|
160 |
commentairesBoutonModifier = creerBoutonModifier();
|
160 |
commentairesBoutonModifier = creerBoutonModifier();
|
161 |
barreOutils.add(commentairesBoutonModifier);
|
161 |
barreOutils.add(commentairesBoutonModifier);
|
162 |
|
162 |
|
163 |
barreOutils.add(new SeparatorToolItem());
|
163 |
barreOutils.add(new SeparatorToolItem());
|
164 |
|
164 |
|
165 |
commentairesBoutonSupprimer = creerBoutonSupprimer();
|
165 |
commentairesBoutonSupprimer = creerBoutonSupprimer();
|
166 |
barreOutils.add(commentairesBoutonSupprimer);
|
166 |
barreOutils.add(commentairesBoutonSupprimer);
|
167 |
|
167 |
|
168 |
barreOutils.add(new SeparatorToolItem());
|
168 |
barreOutils.add(new SeparatorToolItem());
|
169 |
|
169 |
|
170 |
Button rafraichirPersonneBouton = creerBoutonRafraichir();
|
170 |
Button rafraichirPersonneBouton = creerBoutonRafraichir();
|
171 |
barreOutils.add(rafraichirPersonneBouton);
|
171 |
barreOutils.add(rafraichirPersonneBouton);
|
172 |
|
172 |
|
173 |
return barreOutils;
|
173 |
return barreOutils;
|
174 |
}
|
174 |
}
|
175 |
|
175 |
|
176 |
private Button creerBoutonAjouter() {
|
176 |
private Button creerBoutonAjouter() {
|
177 |
Button bouton = new Button(i18nC.ajouter());
|
177 |
Button bouton = new Button(i18nC.ajouter());
|
178 |
bouton.setIcon(Images.ICONES.vcardAjouter());
|
178 |
bouton.setIcon(Images.ICONES.vcardAjouter());
|
179 |
bouton.addSelectionListener(new SelectionListener<ButtonEvent>() {
|
179 |
bouton.addSelectionListener(new SelectionListener<ButtonEvent>() {
|
180 |
|
180 |
|
181 |
@Override
|
181 |
@Override
|
182 |
public void componentSelected(ButtonEvent ce) {
|
182 |
public void componentSelected(ButtonEvent ce) {
|
183 |
fenetreFormulaire = creerFenetreModaleAvecFormulaireCommentaire(Formulaire.MODE_AJOUTER);
|
183 |
fenetreFormulaire = creerFenetreModaleAvecFormulaireCommentaire(Formulaire.MODE_AJOUTER);
|
184 |
fenetreFormulaire.show();
|
184 |
fenetreFormulaire.show();
|
185 |
}
|
185 |
}
|
186 |
});
|
186 |
});
|
187 |
return bouton;
|
187 |
return bouton;
|
188 |
}
|
188 |
}
|
189 |
|
189 |
|
190 |
private Button creerBoutonModifier() {
|
190 |
private Button creerBoutonModifier() {
|
191 |
Button bouton = new Button(i18nC.modifier());
|
191 |
Button bouton = new Button(i18nC.modifier());
|
192 |
bouton.setIcon(Images.ICONES.vcardModifier());
|
192 |
bouton.setIcon(Images.ICONES.vcardModifier());
|
193 |
bouton.addSelectionListener(new SelectionListener<ButtonEvent>() {
|
193 |
bouton.addSelectionListener(new SelectionListener<ButtonEvent>() {
|
194 |
@Override
|
194 |
@Override
|
195 |
public void componentSelected(ButtonEvent ce) {
|
195 |
public void componentSelected(ButtonEvent ce) {
|
196 |
ModelData commentaireSaisiSelectionne = grille.getGrille().getSelectionModel().getSelectedItem();
|
196 |
ModelData commentaireSaisiSelectionne = grille.getGrille().getSelectionModel().getSelectedItem();
|
197 |
if (commentaireSaisiSelectionne == null) {
|
197 |
if (commentaireSaisiSelectionne == null) {
|
198 |
InfoLogger.display(i18nC.informationTitreGenerique(), i18nC.selectionnerCommentaire());
|
198 |
InfoLogger.display(i18nC.informationTitreGenerique(), i18nC.selectionnerCommentaire());
|
199 |
} else {
|
199 |
} else {
|
200 |
fenetreFormulaire = creerFenetreModaleAvecFormulaireCommentaire(Formulaire.MODE_MODIFIER);
|
200 |
fenetreFormulaire = creerFenetreModaleAvecFormulaireCommentaire(Formulaire.MODE_MODIFIER);
|
201 |
fenetreFormulaire.show();
|
201 |
fenetreFormulaire.show();
|
202 |
}
|
202 |
}
|
203 |
}
|
203 |
}
|
204 |
});
|
204 |
});
|
205 |
return bouton;
|
205 |
return bouton;
|
206 |
}
|
206 |
}
|
207 |
|
207 |
|
208 |
private FenetreForm creerFenetreModaleAvecFormulaireCommentaire(String mode) {
|
208 |
private FenetreForm creerFenetreModaleAvecFormulaireCommentaire(String mode) {
|
209 |
String commentaireId = null;
|
209 |
String commentaireId = null;
|
210 |
if (mode.equals(Formulaire.MODE_MODIFIER)) {
|
210 |
if (mode.equals(Formulaire.MODE_MODIFIER)) {
|
211 |
ModelData commentaierSaisieSelectionnee = grille.getGrille().getSelectionModel().getSelectedItem();
|
211 |
ModelData commentaierSaisieSelectionnee = grille.getGrille().getSelectionModel().getSelectedItem();
|
212 |
CollectionACommentaire cac = new CollectionACommentaire(commentaierSaisieSelectionnee, false);
|
212 |
CollectionACommentaire cac = new CollectionACommentaire(commentaierSaisieSelectionnee, false);
|
213 |
commentaireId = cac.getIdCommentaire();
|
213 |
commentaireId = cac.getIdCommentaire();
|
214 |
}
|
214 |
}
|
215 |
|
215 |
|
216 |
final FenetreForm fenetre = new FenetreForm("");
|
216 |
final FenetreForm fenetre = new FenetreForm("");
|
217 |
final CommentaireForm formulaire = creerFormulaireCommentaire(fenetre, commentaireId);
|
217 |
final CommentaireForm formulaire = creerFormulaireCommentaire(fenetre, commentaireId);
|
218 |
fenetre.add(formulaire);
|
218 |
fenetre.add(formulaire);
|
219 |
return fenetre;
|
219 |
return fenetre;
|
220 |
}
|
220 |
}
|
221 |
|
221 |
|
222 |
private CommentaireForm creerFormulaireCommentaire(final FenetreForm fenetre, String commentaireId) {
|
222 |
private CommentaireForm creerFormulaireCommentaire(final FenetreForm fenetre, String commentaireId) {
|
223 |
CommentaireForm formulaire = new CommentaireForm(mediateur, commentaireId, this);
|
223 |
CommentaireForm formulaire = new CommentaireForm(mediateur, commentaireId, this);
|
224 |
FormPanel panneauFormulaire = formulaire.getFormulaire();
|
224 |
FormPanel panneauFormulaire = formulaire.getFormulaire();
|
225 |
fenetre.setHeadingHtml(panneauFormulaire.getHeadingHtml());
|
225 |
fenetre.setHeadingHtml(panneauFormulaire.getHeadingHtml());
|
226 |
panneauFormulaire.setHeaderVisible(false);
|
226 |
panneauFormulaire.setHeaderVisible(false);
|
227 |
panneauFormulaire.setTopComponent(null);
|
227 |
panneauFormulaire.setTopComponent(null);
|
228 |
|
228 |
|
229 |
// FIXME : avec GXT-2.1.0 la redéfinition du bottom component ne marche plus. Nous le cachons et en créeons un dans la fenêtre.
|
229 |
// FIXME : avec GXT-2.1.0 la redéfinition du bottom component ne marche plus. Nous le cachons et en créeons un dans la fenêtre.
|
230 |
panneauFormulaire.getBottomComponent().hide();
|
230 |
panneauFormulaire.getBottomComponent().hide();
|
231 |
SelectionListener<ButtonEvent> ecouteur = creerEcouteurValidationFormulaireCommentaire(fenetre, formulaire);
|
231 |
SelectionListener<ButtonEvent> ecouteur = creerEcouteurValidationFormulaireCommentaire(fenetre, formulaire);
|
232 |
final ButtonBar barreValidation = new FormulaireBarreValidation(ecouteur);
|
232 |
final ButtonBar barreValidation = new FormulaireBarreValidation(ecouteur);
|
233 |
fenetre.setBottomComponent(barreValidation);
|
233 |
fenetre.setBottomComponent(barreValidation);
|
234 |
|
234 |
|
235 |
return formulaire;
|
235 |
return formulaire;
|
236 |
}
|
236 |
}
|
237 |
|
237 |
|
238 |
private SelectionListener<ButtonEvent> creerEcouteurValidationFormulaireCommentaire(final FenetreForm fenetre, final CommentaireForm formulaire) {
|
238 |
private SelectionListener<ButtonEvent> creerEcouteurValidationFormulaireCommentaire(final FenetreForm fenetre, final CommentaireForm formulaire) {
|
239 |
SelectionListener<ButtonEvent> ecouteur = new SelectionListener<ButtonEvent>() {
|
239 |
SelectionListener<ButtonEvent> ecouteur = new SelectionListener<ButtonEvent>() {
|
240 |
@Override
|
240 |
@Override
|
241 |
public void componentSelected(ButtonEvent ce) {
|
241 |
public void componentSelected(ButtonEvent ce) {
|
242 |
String code = ((Button) ce.getComponent()).getData("code");
|
242 |
String code = ((Button) ce.getComponent()).getData("code");
|
243 |
if (code.equals(FormulaireBarreValidation.CODE_BOUTON_VALIDER)) {
|
243 |
if (code.equals(FormulaireBarreValidation.CODE_BOUTON_VALIDER)) {
|
244 |
if (formulaire.soumettreFormulaire()) {
|
244 |
if (formulaire.soumettreFormulaire()) {
|
245 |
fenetre.hide();
|
245 |
fenetre.hide();
|
246 |
}
|
246 |
}
|
247 |
} else if (code.equals(FormulaireBarreValidation.CODE_BOUTON_APPLIQUER)) {
|
247 |
} else if (code.equals(FormulaireBarreValidation.CODE_BOUTON_APPLIQUER)) {
|
248 |
formulaire.soumettreFormulaire();
|
248 |
formulaire.soumettreFormulaire();
|
249 |
} else if (code.equals(FormulaireBarreValidation.CODE_BOUTON_ANNULER)) {
|
249 |
} else if (code.equals(FormulaireBarreValidation.CODE_BOUTON_ANNULER)) {
|
250 |
fenetre.hide();
|
250 |
fenetre.hide();
|
251 |
}
|
251 |
}
|
252 |
}
|
252 |
}
|
253 |
};
|
253 |
};
|
254 |
|
254 |
|
255 |
return ecouteur;
|
255 |
return ecouteur;
|
256 |
}
|
256 |
}
|
257 |
|
257 |
|
258 |
private Button creerBoutonSupprimer() {
|
258 |
private Button creerBoutonSupprimer() {
|
259 |
Button bouton = new Button(i18nC.supprimer());
|
259 |
Button bouton = new Button(i18nC.supprimer());
|
260 |
bouton.setIcon(Images.ICONES.vcardSupprimer());
|
260 |
bouton.setIcon(Images.ICONES.vcardSupprimer());
|
261 |
bouton.addSelectionListener(new SelectionListener<ButtonEvent>() {
|
261 |
bouton.addSelectionListener(new SelectionListener<ButtonEvent>() {
|
262 |
public void componentSelected(ButtonEvent ce) {
|
262 |
public void componentSelected(ButtonEvent ce) {
|
263 |
ModelData commentaireSaisiSelectionnee = grille.getGrille().getSelectionModel().getSelectedItem();
|
263 |
ModelData commentaireSaisiSelectionnee = grille.getGrille().getSelectionModel().getSelectedItem();
|
264 |
CollectionACommentaire cac = new CollectionACommentaire(commentaireSaisiSelectionnee, false);
|
264 |
CollectionACommentaire cac = new CollectionACommentaire(commentaireSaisiSelectionnee, false);
|
265 |
if (commentaireSaisiSelectionnee == null) {
|
265 |
if (commentaireSaisiSelectionnee == null) {
|
266 |
InfoLogger.display(i18nC.informationTitreGenerique(), i18nC.selectionnerCommentaire());
|
266 |
InfoLogger.display(i18nC.informationTitreGenerique(), i18nC.selectionnerCommentaire());
|
267 |
} else {
|
267 |
} else {
|
268 |
supprimerDansGrille(cac);
|
268 |
supprimerDansGrille(cac);
|
269 |
}
|
269 |
}
|
270 |
}
|
270 |
}
|
271 |
});
|
271 |
});
|
272 |
return bouton;
|
272 |
return bouton;
|
273 |
}
|
273 |
}
|
274 |
|
274 |
|
275 |
private Button creerBoutonRafraichir() {
|
275 |
private Button creerBoutonRafraichir() {
|
276 |
Button bouton = new Button(i18nC.rafraichir());
|
276 |
Button bouton = new Button(i18nC.rafraichir());
|
277 |
bouton.setIcon(Images.ICONES.rafraichir());
|
277 |
bouton.setIcon(Images.ICONES.rafraichir());
|
278 |
bouton.addSelectionListener(new SelectionListener<ButtonEvent>() {
|
278 |
bouton.addSelectionListener(new SelectionListener<ButtonEvent>() {
|
279 |
public void componentSelected(ButtonEvent ce) {
|
279 |
public void componentSelected(ButtonEvent ce) {
|
280 |
actualiserGrille();
|
280 |
actualiserGrille();
|
281 |
}
|
281 |
}
|
282 |
});
|
282 |
});
|
283 |
return bouton;
|
283 |
return bouton;
|
284 |
}
|
284 |
}
|
285 |
|
285 |
|
286 |
private ChampComboBoxRechercheTempsReelPaginable creerComboBoxCommentairesSaisies() {
|
286 |
private ChampComboBoxRechercheTempsReelPaginable creerComboBoxCommentairesSaisies() {
|
287 |
|
287 |
|
288 |
ModelType modelTypeCommentaires = new ModelType();
|
288 |
ModelType modelTypeCommentaires = new ModelType();
|
289 |
modelTypeCommentaires.setRoot("commentaires");
|
289 |
modelTypeCommentaires.setRoot("commentaires");
|
290 |
modelTypeCommentaires.setTotalName("nbElements");
|
290 |
modelTypeCommentaires.setTotalName("nbElements");
|
291 |
modelTypeCommentaires.addField("ccm_id_commentaire");
|
291 |
modelTypeCommentaires.addField("ccm_id_commentaire");
|
292 |
modelTypeCommentaires.addField("ccm_ce_pere");
|
292 |
modelTypeCommentaires.addField("ccm_ce_pere");
|
293 |
modelTypeCommentaires.addField("ccm_titre");
|
293 |
modelTypeCommentaires.addField("ccm_titre");
|
294 |
modelTypeCommentaires.addField("ccm_texte");
|
294 |
modelTypeCommentaires.addField("ccm_texte");
|
295 |
modelTypeCommentaires.addField("ccm_ponderation");
|
295 |
modelTypeCommentaires.addField("ccm_ponderation");
|
296 |
modelTypeCommentaires.addField("ccm_mark_public");
|
296 |
modelTypeCommentaires.addField("ccm_mark_public");
|
297 |
|
297 |
|
298 |
String displayNameCommentaires = "ccm_titre";
|
298 |
String displayNameCommentaires = "ccm_titre";
|
299 |
ProxyCommentaires<ModelData> proxyCommentaires = new ProxyCommentaires<ModelData>(null);
|
299 |
ProxyCommentaires<ModelData> proxyCommentaires = new ProxyCommentaires<ModelData>(null);
|
300 |
|
300 |
|
301 |
final ChampComboBoxRechercheTempsReelPaginable commentairesCombo = new ChampComboBoxRechercheTempsReelPaginable(proxyCommentaires, modelTypeCommentaires, displayNameCommentaires);
|
301 |
final ChampComboBoxRechercheTempsReelPaginable commentairesCombo = new ChampComboBoxRechercheTempsReelPaginable(proxyCommentaires, modelTypeCommentaires, displayNameCommentaires);
|
302 |
commentairesCombo.getCombo().setTabIndex(tabIndex++);
|
302 |
commentairesCombo.getCombo().setTabIndex(tabIndex++);
|
303 |
commentairesCombo.getCombo().setForceSelection(true);
|
303 |
commentairesCombo.getCombo().setForceSelection(true);
|
304 |
|
304 |
|
305 |
commentairesCombo.getCombo().setValidator(new Validator() {
|
305 |
commentairesCombo.getCombo().setValidator(new Validator() {
|
306 |
public String validate(Field<?> field, String value) {
|
306 |
public String validate(Field<?> field, String value) {
|
307 |
String retour = null;
|
307 |
String retour = null;
|
308 |
if (field.getRawValue().equals("")) {
|
308 |
if (field.getRawValue().equals("")) {
|
309 |
field.setValue(null);
|
309 |
field.setValue(null);
|
310 |
} else if (commentairesCombo.getStore().findModel("ccm_titre", field.getRawValue()) == null) {
|
310 |
} else if (commentairesCombo.getStore().findModel("ccm_titre", field.getRawValue()) == null) {
|
311 |
String contenuBrut = field.getRawValue();
|
311 |
String contenuBrut = field.getRawValue();
|
312 |
field.setValue(null);
|
312 |
field.setValue(null);
|
313 |
field.setRawValue(contenuBrut);
|
313 |
field.setRawValue(contenuBrut);
|
314 |
retour = "Veuillez sélectionner une valeur ou laisser le champ vide";
|
314 |
retour = "Veuillez sélectionner une valeur ou laisser le champ vide";
|
315 |
}
|
315 |
}
|
316 |
return retour;
|
316 |
return retour;
|
317 |
}
|
317 |
}
|
318 |
});
|
318 |
});
|
- |
|
319 |
|
- |
|
320 |
commentairesCombo.getCombo().setEmptyText("Rechercher et sélectionner une note existante dans la base");
|
319 |
|
321 |
|
320 |
commentairesCombo.getCombo().addListener(Events.Select, new Listener<BaseEvent>() {
|
322 |
commentairesCombo.getCombo().addListener(Events.Select, new Listener<BaseEvent>() {
|
321 |
public void handleEvent(BaseEvent be) {
|
323 |
public void handleEvent(BaseEvent be) {
|
322 |
if (commentairesSaisisComboBox.getValeur() instanceof ModelData) {
|
324 |
if (commentairesSaisisComboBox.getValeur() instanceof ModelData) {
|
323 |
Commentaire commentaireSaisiSelectionnee = new Commentaire(commentairesSaisisComboBox.getValeur());
|
325 |
Commentaire commentaireSaisiSelectionnee = new Commentaire(commentairesSaisisComboBox.getValeur());
|
324 |
ajouterDansGrille(commentaireSaisiSelectionnee);
|
326 |
ajouterDansGrille(commentaireSaisiSelectionnee);
|
325 |
commentairesSaisisComboBox.getCombo().setValue(null);
|
327 |
commentairesSaisisComboBox.getCombo().setValue(null);
|
326 |
}
|
328 |
}
|
327 |
}
|
329 |
}
|
328 |
});
|
330 |
});
|
329 |
|
331 |
|
330 |
return commentairesCombo;
|
332 |
return commentairesCombo;
|
331 |
}
|
333 |
}
|
332 |
|
334 |
|
333 |
private void ajouterDansGrille(Commentaire commentaire) {
|
335 |
private void ajouterDansGrille(Commentaire commentaire) {
|
334 |
ajouterDansGrille(commentaire, null, 0);
|
336 |
ajouterDansGrille(commentaire, null, 0);
|
335 |
}
|
337 |
}
|
336 |
|
338 |
|
337 |
private void ajouterDansGrille(Commentaire commentaire, String type, int index) {
|
339 |
private void ajouterDansGrille(Commentaire commentaire, String type, int index) {
|
338 |
if (commentaire != null) {
|
340 |
if (commentaire != null) {
|
339 |
CollectionACommentaire relationCollectionACommentaire = new CollectionACommentaire();
|
341 |
CollectionACommentaire relationCollectionACommentaire = new CollectionACommentaire();
|
340 |
relationCollectionACommentaire.setCommentaire(commentaire);
|
342 |
relationCollectionACommentaire.setCommentaire(commentaire);
|
341 |
relationCollectionACommentaire.setIdCommentaire(commentaire.getId());
|
343 |
relationCollectionACommentaire.setIdCommentaire(commentaire.getId());
|
342 |
if (type != null) {
|
344 |
if (type != null) {
|
343 |
relationCollectionACommentaire.set("_type_", type);
|
345 |
relationCollectionACommentaire.set("_type_", type);
|
344 |
}
|
346 |
}
|
345 |
// Gestion de l'id de la collection
|
347 |
// Gestion de l'id de la collection
|
346 |
if (mode.equals(Formulaire.MODE_MODIFIER)) {
|
348 |
if (mode.equals(Formulaire.MODE_MODIFIER)) {
|
347 |
relationCollectionACommentaire.setIdCollection(collection.getId());
|
349 |
relationCollectionACommentaire.setIdCollection(collection.getId());
|
348 |
}
|
350 |
}
|
349 |
relationCollectionACommentaire.set("_etat_", aDonnee.ETAT_AJOUTE);
|
351 |
relationCollectionACommentaire.set("_etat_", aDonnee.ETAT_AJOUTE);
|
350 |
corrigerChampsGrille(relationCollectionACommentaire);
|
352 |
corrigerChampsGrille(relationCollectionACommentaire);
|
351 |
|
353 |
|
352 |
// Ajout à la grille
|
354 |
// Ajout à la grille
|
353 |
grille.getGrille().stopEditing();
|
355 |
grille.getGrille().stopEditing();
|
354 |
grille.getGrille().getStore().insert(relationCollectionACommentaire, index);
|
356 |
grille.getGrille().getStore().insert(relationCollectionACommentaire, index);
|
355 |
grille.getGrille().startEditing(index, 0);
|
357 |
grille.getGrille().startEditing(index, 0);
|
356 |
grille.getGrille().getSelectionModel().select(index, false);
|
358 |
grille.getGrille().getSelectionModel().select(index, false);
|
357 |
}
|
359 |
}
|
358 |
}
|
360 |
}
|
359 |
|
361 |
|
360 |
private void supprimerDansGrille(CollectionACommentaire relationCollectionACommentaire) {
|
362 |
private void supprimerDansGrille(CollectionACommentaire relationCollectionACommentaire) {
|
361 |
if (relationCollectionACommentaire != null) {
|
363 |
if (relationCollectionACommentaire != null) {
|
362 |
// Ajout de la personne supprimée à la liste
|
364 |
// Ajout de la personne supprimée à la liste
|
363 |
if ((relationCollectionACommentaire.get("_etat_").equals("") || !relationCollectionACommentaire.get("_etat_").equals(aDonnee.ETAT_AJOUTE))
|
365 |
if ((relationCollectionACommentaire.get("_etat_").equals("") || !relationCollectionACommentaire.get("_etat_").equals(aDonnee.ETAT_AJOUTE))
|
364 |
&& relationCollectionACommentaire.getId() != null
|
366 |
&& relationCollectionACommentaire.getId() != null
|
365 |
&& !relationCollectionACommentaire.getId().equals("")) {
|
367 |
&& !relationCollectionACommentaire.getId().equals("")) {
|
366 |
commentairesSupprimes.put("id"+idGenere++, relationCollectionACommentaire);
|
368 |
commentairesSupprimes.put("id"+idGenere++, relationCollectionACommentaire);
|
367 |
}
|
369 |
}
|
368 |
|
370 |
|
369 |
// Suppression de l'enregistrement de la grille
|
371 |
// Suppression de l'enregistrement de la grille
|
370 |
grille.getStore().remove(relationCollectionACommentaire);
|
372 |
grille.getStore().remove(relationCollectionACommentaire);
|
371 |
}
|
373 |
}
|
372 |
}
|
374 |
}
|
373 |
|
375 |
|
374 |
private GrillePaginable<ModelData> creerGrille() {
|
376 |
private GrillePaginable<ModelData> creerGrille() {
|
375 |
|
377 |
|
376 |
GrillePaginable<ModelData> grillePaginable = null;
|
378 |
GrillePaginable<ModelData> grillePaginable = null;
|
377 |
|
379 |
|
378 |
// ModelType
|
380 |
// ModelType
|
379 |
ModelType modelTypeCollectionACommentaire = new ModelType();
|
381 |
ModelType modelTypeCollectionACommentaire = new ModelType();
|
380 |
modelTypeCollectionACommentaire.setRoot("collectionsACommentaire");
|
382 |
modelTypeCollectionACommentaire.setRoot("collectionsACommentaire");
|
381 |
modelTypeCollectionACommentaire.setTotalName("nbElements");
|
383 |
modelTypeCollectionACommentaire.setTotalName("nbElements");
|
382 |
modelTypeCollectionACommentaire.addField("ccac_id_commentaire");
|
384 |
modelTypeCollectionACommentaire.addField("ccac_id_commentaire");
|
383 |
modelTypeCollectionACommentaire.addField("ccac_id_collection");
|
385 |
modelTypeCollectionACommentaire.addField("ccac_id_collection");
|
384 |
modelTypeCollectionACommentaire.addField("ccac_truk_type");
|
386 |
modelTypeCollectionACommentaire.addField("ccac_truk_type");
|
385 |
modelTypeCollectionACommentaire.addField("ccm_id_commentaire");
|
387 |
modelTypeCollectionACommentaire.addField("ccm_id_commentaire");
|
386 |
modelTypeCollectionACommentaire.addField("ccm_titre");
|
388 |
modelTypeCollectionACommentaire.addField("ccm_titre");
|
387 |
modelTypeCollectionACommentaire.addField("ccm_texte");
|
389 |
modelTypeCollectionACommentaire.addField("ccm_texte");
|
388 |
modelTypeCollectionACommentaire.addField("ccm_ponderation");
|
390 |
modelTypeCollectionACommentaire.addField("ccm_ponderation");
|
389 |
modelTypeCollectionACommentaire.addField("ccm_mark_public");
|
391 |
modelTypeCollectionACommentaire.addField("ccm_mark_public");
|
390 |
modelTypeCollectionACommentaire.addField("ccm_ce_pere");
|
392 |
modelTypeCollectionACommentaire.addField("ccm_ce_pere");
|
391 |
|
393 |
|
392 |
// Proxy
|
394 |
// Proxy
|
393 |
ProxyCollectionACommentaire<ModelData> proxyCollectionACommentaire = new ProxyCollectionACommentaire<ModelData>(null, collection.getId());
|
395 |
ProxyCollectionACommentaire<ModelData> proxyCollectionACommentaire = new ProxyCollectionACommentaire<ModelData>(null, collection.getId());
|
394 |
|
396 |
|
395 |
// Colonnes
|
397 |
// Colonnes
|
396 |
List<ColumnConfig> colonnes = new ArrayList<ColumnConfig>();
|
398 |
List<ColumnConfig> colonnes = new ArrayList<ColumnConfig>();
|
397 |
|
399 |
|
398 |
RowNumberer pluginLigneNumero = new RowNumberer();
|
400 |
RowNumberer pluginLigneNumero = new RowNumberer();
|
399 |
colonnes.add(pluginLigneNumero);
|
401 |
colonnes.add(pluginLigneNumero);
|
400 |
|
402 |
|
401 |
colonnes.add(creerColonneType());
|
403 |
colonnes.add(creerColonneType());
|
402 |
colonnes.add(new ColumnConfig("_titre_", i18nC.commentaireTitre(), 150));
|
404 |
colonnes.add(new ColumnConfig("_titre_", i18nC.commentaireTitre(), 150));
|
403 |
colonnes.add(new ColumnConfig("_texte_", i18nC.commentaireTexte(), 75));
|
405 |
colonnes.add(new ColumnConfig("_texte_", i18nC.commentaireTexte(), 75));
|
404 |
colonnes.add(new ColumnConfig("_ponderation_", i18nC.commentairePonderation(), 35));
|
406 |
colonnes.add(new ColumnConfig("_ponderation_", i18nC.commentairePonderation(), 35));
|
405 |
colonnes.add(creerColonneAcces());
|
407 |
colonnes.add(creerColonneAcces());
|
406 |
|
408 |
|
407 |
// Modèle de colonnes
|
409 |
// Modèle de colonnes
|
408 |
ColumnModel modeleDeColonnes = new ColumnModel(colonnes);
|
410 |
ColumnModel modeleDeColonnes = new ColumnModel(colonnes);
|
409 |
GridSelectionModel<ModelData> modeleDeSelection = new GridSelectionModel<ModelData>();
|
411 |
GridSelectionModel<ModelData> modeleDeSelection = new GridSelectionModel<ModelData>();
|
410 |
|
412 |
|
411 |
HashMap<String, String> virtualFields = new HashMap<String, String>();
|
413 |
HashMap<String, String> virtualFields = new HashMap<String, String>();
|
412 |
virtualFields.put("_titre_", "ccm_titre");
|
414 |
virtualFields.put("_titre_", "ccm_titre");
|
413 |
virtualFields.put("_texte_", "ccm_texte");
|
415 |
virtualFields.put("_texte_", "ccm_texte");
|
414 |
virtualFields.put("_ponderation_", "ccm_ponderation");
|
416 |
virtualFields.put("_ponderation_", "ccm_ponderation");
|
415 |
virtualFields.put("_type_", "ccac_truk_type");
|
417 |
virtualFields.put("_type_", "ccac_truk_type");
|
416 |
virtualFields.put("_public_", "ccm_mark_public");
|
418 |
virtualFields.put("_public_", "ccm_mark_public");
|
417 |
virtualFields.put("_etat_", "");
|
419 |
virtualFields.put("_etat_", "");
|
418 |
|
420 |
|
419 |
// Grille
|
421 |
// Grille
|
420 |
grillePaginable = new GrillePaginable<ModelData>(modelTypeCollectionACommentaire, virtualFields, proxyCollectionACommentaire, colonnes, modeleDeColonnes);
|
422 |
grillePaginable = new GrillePaginable<ModelData>(modelTypeCollectionACommentaire, virtualFields, proxyCollectionACommentaire, colonnes, modeleDeColonnes);
|
421 |
grillePaginable.getGrille().setBorders(true);
|
423 |
grillePaginable.getGrille().setBorders(true);
|
422 |
grillePaginable.getGrille().setSelectionModel(modeleDeSelection);
|
424 |
grillePaginable.getGrille().setSelectionModel(modeleDeSelection);
|
423 |
grillePaginable.getGrille().addPlugin(pluginLigneNumero);
|
425 |
grillePaginable.getGrille().addPlugin(pluginLigneNumero);
|
424 |
grillePaginable.getGrille().getView().setForceFit(true);
|
426 |
grillePaginable.getGrille().getView().setForceFit(true);
|
425 |
grillePaginable.getGrille().setAutoExpandColumn("_titre_");
|
427 |
grillePaginable.getGrille().setAutoExpandColumn("_titre_");
|
426 |
grillePaginable.getGrille().setStripeRows(true);
|
428 |
grillePaginable.getGrille().setStripeRows(true);
|
427 |
grillePaginable.getGrille().setTrackMouseOver(true);
|
429 |
grillePaginable.getGrille().setTrackMouseOver(true);
|
428 |
|
430 |
|
429 |
// Rajouter des écouteurs
|
431 |
// Rajouter des écouteurs
|
430 |
grillePaginable.getStore().addListener(Store.Update, new Listener<StoreEvent<ModelData>>() {
|
432 |
grillePaginable.getStore().addListener(Store.Update, new Listener<StoreEvent<ModelData>>() {
|
431 |
public void handleEvent(StoreEvent<ModelData> ce) {
|
433 |
public void handleEvent(StoreEvent<ModelData> ce) {
|
432 |
if (ce.getRecord().isModified("_type_") && ce.getModel().get("_etat_") == null || !ce.getModel().get("_etat_").equals(aDonnee.ETAT_AJOUTE)) {
|
434 |
if (ce.getRecord().isModified("_type_") && ce.getModel().get("_etat_") == null || !ce.getModel().get("_etat_").equals(aDonnee.ETAT_AJOUTE)) {
|
433 |
ce.getModel().set("_etat_", aDonnee.ETAT_MODIFIE);
|
435 |
ce.getModel().set("_etat_", aDonnee.ETAT_MODIFIE);
|
434 |
}
|
436 |
}
|
435 |
}
|
437 |
}
|
436 |
});
|
438 |
});
|
437 |
|
439 |
|
438 |
return grillePaginable;
|
440 |
return grillePaginable;
|
439 |
}
|
441 |
}
|
440 |
|
442 |
|
441 |
private ColumnConfig creerColonneType() {
|
443 |
private ColumnConfig creerColonneType() {
|
442 |
typeCombo = new ChampComboBoxMultiSelect<Valeur>();
|
444 |
typeCombo = new ChampComboBoxMultiSelect<Valeur>();
|
443 |
typeCombo.setDisplayField("nom");
|
445 |
typeCombo.setDisplayField("nom");
|
444 |
typeCombo.setValueField("id_valeur");
|
446 |
typeCombo.setValueField("id_valeur");
|
445 |
typeCombo.setStore(new ListStore<Valeur>());
|
447 |
typeCombo.setStore(new ListStore<Valeur>());
|
446 |
typeCombo.setEditable(false);
|
448 |
typeCombo.setEditable(false);
|
447 |
typeCombo.setForceSelection(true);
|
449 |
typeCombo.setForceSelection(true);
|
448 |
|
450 |
|
449 |
CellEditor typeEditeur = new CellEditor(typeCombo) {
|
451 |
CellEditor typeEditeur = new CellEditor(typeCombo) {
|
450 |
@SuppressWarnings("unchecked")
|
452 |
@SuppressWarnings("unchecked")
|
451 |
@Override
|
453 |
@Override
|
452 |
public Object preProcessValue(Object valeur) {
|
454 |
public Object preProcessValue(Object valeur) {
|
453 |
Valeur retour = new Valeur();
|
455 |
Valeur retour = new Valeur();
|
454 |
if (valeur != null ) {
|
456 |
if (valeur != null ) {
|
455 |
if (valeur instanceof String) {
|
457 |
if (valeur instanceof String) {
|
456 |
((ChampComboBoxMultiSelect<Valeur>) getField()).peuplerAvecTexte(valeur.toString());
|
458 |
((ChampComboBoxMultiSelect<Valeur>) getField()).peuplerAvecTexte(valeur.toString());
|
457 |
}
|
459 |
}
|
458 |
}
|
460 |
}
|
459 |
return retour;
|
461 |
return retour;
|
460 |
}
|
462 |
}
|
461 |
|
463 |
|
462 |
@Override
|
464 |
@Override
|
463 |
public Object postProcessValue(Object valeur) {
|
465 |
public Object postProcessValue(Object valeur) {
|
464 |
String retour = null;
|
466 |
String retour = null;
|
465 |
if (getField().getRawValue() != null ) {
|
467 |
if (getField().getRawValue() != null ) {
|
466 |
retour = getField().getRawValue();
|
468 |
retour = getField().getRawValue();
|
467 |
}
|
469 |
}
|
468 |
return retour;
|
470 |
return retour;
|
469 |
}
|
471 |
}
|
470 |
};
|
472 |
};
|
471 |
|
473 |
|
472 |
GridCellRenderer<ModelData> typeRendu = new GridCellRenderer<ModelData>() {
|
474 |
GridCellRenderer<ModelData> typeRendu = new GridCellRenderer<ModelData>() {
|
473 |
public String render(ModelData model, String property, ColumnData config, int rowIndex, int colIndex, ListStore<ModelData> store, Grid<ModelData> grid) {
|
475 |
public String render(ModelData model, String property, ColumnData config, int rowIndex, int colIndex, ListStore<ModelData> store, Grid<ModelData> grid) {
|
474 |
String type = model.get("_type_");
|
476 |
String type = model.get("_type_");
|
475 |
if (typeCombo.getStore() != null && type != null && (type.matches("[0-9]+") || type.contains(aDonnee.SEPARATEUR_VALEURS))) {
|
477 |
if (typeCombo.getStore() != null && type != null && (type.matches("[0-9]+") || type.contains(aDonnee.SEPARATEUR_VALEURS))) {
|
476 |
type = typeCombo.formaterIdentifiantsEnTexte(type);
|
478 |
type = typeCombo.formaterIdentifiantsEnTexte(type);
|
477 |
model.set("_type_", type);
|
479 |
model.set("_type_", type);
|
478 |
}
|
480 |
}
|
479 |
return type;
|
481 |
return type;
|
480 |
}
|
482 |
}
|
481 |
};
|
483 |
};
|
482 |
ColumnConfig typeColonne = new ColumnConfig("_type_", i18nC.commentaireType(), 100);
|
484 |
ColumnConfig typeColonne = new ColumnConfig("_type_", i18nC.commentaireType(), 100);
|
483 |
typeColonne.setEditor(typeEditeur);
|
485 |
typeColonne.setEditor(typeEditeur);
|
484 |
typeColonne.setRenderer(typeRendu);
|
486 |
typeColonne.setRenderer(typeRendu);
|
485 |
return typeColonne;
|
487 |
return typeColonne;
|
486 |
}
|
488 |
}
|
487 |
|
489 |
|
488 |
private ColumnConfig creerColonneAcces() {
|
490 |
private ColumnConfig creerColonneAcces() {
|
489 |
GridCellRenderer<ModelData> accesRendu = new GridCellRenderer<ModelData>() {
|
491 |
GridCellRenderer<ModelData> accesRendu = new GridCellRenderer<ModelData>() {
|
490 |
public String render(ModelData model, String property, ColumnData config, int rowIndex, int colIndex, ListStore<ModelData> store, Grid<ModelData> grid) {
|
492 |
public String render(ModelData model, String property, ColumnData config, int rowIndex, int colIndex, ListStore<ModelData> store, Grid<ModelData> grid) {
|
491 |
CollectionACommentaire cac = new CollectionACommentaire(model, true);
|
493 |
CollectionACommentaire cac = new CollectionACommentaire(model, true);
|
492 |
String acces = (cac.getCommentaire().etrePublic() ? i18nC.donneePublic() : i18nC.donneePrivee());
|
494 |
String acces = (cac.getCommentaire().etrePublic() ? i18nC.donneePublic() : i18nC.donneePrivee());
|
493 |
model.set("_public_", acces);
|
495 |
model.set("_public_", acces);
|
494 |
return acces;
|
496 |
return acces;
|
495 |
}
|
497 |
}
|
496 |
};
|
498 |
};
|
497 |
ColumnConfig accesColonne = new ColumnConfig("_public_", i18nC.commentairePublic(), 30);
|
499 |
ColumnConfig accesColonne = new ColumnConfig("_public_", i18nC.commentairePublic(), 30);
|
498 |
accesColonne.setRenderer(accesRendu);
|
500 |
accesColonne.setRenderer(accesRendu);
|
499 |
return accesColonne;
|
501 |
return accesColonne;
|
500 |
}
|
502 |
}
|
501 |
|
503 |
|
502 |
public void actualiserEtatBoutonsBarreOutils() {
|
504 |
public void actualiserEtatBoutonsBarreOutils() {
|
503 |
// Activation des boutons si la grille contient un élément
|
505 |
// Activation des boutons si la grille contient un élément
|
504 |
if (grille.getStore().getCount() > 0) {
|
506 |
if (grille.getStore().getCount() > 0) {
|
505 |
commentairesBoutonSupprimer.enable();
|
507 |
commentairesBoutonSupprimer.enable();
|
506 |
commentairesBoutonModifier.enable();
|
508 |
commentairesBoutonModifier.enable();
|
507 |
}
|
509 |
}
|
508 |
// Désactivation des boutons si la grille ne contient plus d'élément
|
510 |
// Désactivation des boutons si la grille ne contient plus d'élément
|
509 |
if (grille.getStore().getCount() == 0) {
|
511 |
if (grille.getStore().getCount() == 0) {
|
510 |
commentairesBoutonSupprimer.disable();
|
512 |
commentairesBoutonSupprimer.disable();
|
511 |
commentairesBoutonModifier.disable();
|
513 |
commentairesBoutonModifier.disable();
|
512 |
}
|
514 |
}
|
513 |
}
|
515 |
}
|
514 |
|
516 |
|
515 |
public void rafraichir(Object nouvellesDonnees) {
|
517 |
public void rafraichir(Object nouvellesDonnees) {
|
516 |
if (nouvellesDonnees instanceof ValeurListe) {
|
518 |
if (nouvellesDonnees instanceof ValeurListe) {
|
517 |
ValeurListe listeValeurs = (ValeurListe) nouvellesDonnees;
|
519 |
ValeurListe listeValeurs = (ValeurListe) nouvellesDonnees;
|
518 |
rafraichirValeurListe(listeValeurs);
|
520 |
rafraichirValeurListe(listeValeurs);
|
519 |
} else if (nouvellesDonnees instanceof Information) {
|
521 |
} else if (nouvellesDonnees instanceof Information) {
|
520 |
Information info = (Information) nouvellesDonnees;
|
522 |
Information info = (Information) nouvellesDonnees;
|
521 |
rafraichirInformation(info);
|
523 |
rafraichirInformation(info);
|
522 |
} else {
|
524 |
} else {
|
523 |
GWT.log(Mediateur.i18nM.erreurRafraichir(nouvellesDonnees.getClass(), this.getClass()), null);
|
525 |
GWT.log(Mediateur.i18nM.erreurRafraichir(nouvellesDonnees.getClass(), this.getClass()), null);
|
524 |
}
|
526 |
}
|
525 |
|
527 |
|
526 |
if (chargementTypesOk && chargementCommentairesOk) {
|
528 |
if (chargementTypesOk && chargementCommentairesOk) {
|
527 |
peupler();
|
529 |
peupler();
|
528 |
initialiserChargement();
|
530 |
initialiserChargement();
|
529 |
}
|
531 |
}
|
530 |
}
|
532 |
}
|
531 |
|
533 |
|
532 |
private void rafraichirValeurListe(ValeurListe listeValeurs) {
|
534 |
private void rafraichirValeurListe(ValeurListe listeValeurs) {
|
533 |
if (listeValeurs.getId().equals(config.getListeId("typeCommentaireCollection"))) {
|
535 |
if (listeValeurs.getId().equals(config.getListeId("typeCommentaireCollection"))) {
|
534 |
List<Valeur> liste = listeValeurs.toList();
|
536 |
List<Valeur> liste = listeValeurs.toList();
|
535 |
if (liste.size() > 0) {
|
537 |
if (liste.size() > 0) {
|
536 |
ListStore<Valeur> store = typeCombo.getStore();
|
538 |
ListStore<Valeur> store = typeCombo.getStore();
|
537 |
store.removeAll();
|
539 |
store.removeAll();
|
538 |
store.add(liste);
|
540 |
store.add(liste);
|
539 |
store.sort("nom", SortDir.ASC);
|
541 |
store.sort("nom", SortDir.ASC);
|
540 |
typeCombo.setStore(store);
|
542 |
typeCombo.setStore(store);
|
541 |
}
|
543 |
}
|
542 |
chargementTypesOk = true;
|
544 |
chargementTypesOk = true;
|
543 |
} else {
|
545 |
} else {
|
544 |
GWT.log("Gestion de la liste "+listeValeurs.getId()+" non implémenté!", null);
|
546 |
GWT.log("Gestion de la liste "+listeValeurs.getId()+" non implémenté!", null);
|
545 |
}
|
547 |
}
|
546 |
}
|
548 |
}
|
547 |
|
549 |
|
548 |
public void rafraichirInformation(Information info) {
|
550 |
public void rafraichirInformation(Information info) {
|
549 |
if (info.getMessages() != null && !info.getMessages().toString().equals("[]")) {
|
551 |
if (info.getMessages() != null && !info.getMessages().toString().equals("[]")) {
|
550 |
GWT.log("MESSAGES:\n"+info.getMessages().toString(), null);
|
552 |
GWT.log("MESSAGES:\n"+info.getMessages().toString(), null);
|
551 |
}
|
553 |
}
|
552 |
String type = info.getType();
|
554 |
String type = info.getType();
|
553 |
if (info.getType().equals("liste_collection_a_commentaire")) {
|
555 |
if (info.getType().equals("liste_collection_a_commentaire")) {
|
554 |
if (info.getDonnee(0) != null) {
|
556 |
if (info.getDonnee(0) != null) {
|
555 |
initialiser();
|
557 |
initialiser();
|
556 |
collection.setCommentairesLiees((CollectionACommentaireListe) info.getDonnee(0));
|
558 |
collection.setCommentairesLiees((CollectionACommentaireListe) info.getDonnee(0));
|
557 |
chargementCommentairesOk = true;
|
559 |
chargementCommentairesOk = true;
|
558 |
}
|
560 |
}
|
559 |
} else if (info.getType().equals("ajout_collection")) {
|
561 |
} else if (info.getType().equals("ajout_collection")) {
|
560 |
if (info.getDonnee(0) != null && info.getDonnee(0) instanceof String) {
|
562 |
if (info.getDonnee(0) != null && info.getDonnee(0) instanceof String) {
|
561 |
String collectionId = (String) info.getDonnee(0);
|
563 |
String collectionId = (String) info.getDonnee(0);
|
562 |
|
564 |
|
563 |
// Suite à la récupération de l'id de la collection nouvellement ajoutée nous ajoutons les personnes liées
|
565 |
// Suite à la récupération de l'id de la collection nouvellement ajoutée nous ajoutons les personnes liées
|
564 |
// En mode AJOUT, il ne peut que y avoir des personnes liées ajoutées
|
566 |
// En mode AJOUT, il ne peut que y avoir des personnes liées ajoutées
|
565 |
mediateur.ajouterCollectionACommentaire(this, collectionId, commentairesAjoutes);
|
567 |
mediateur.ajouterCollectionACommentaire(this, collectionId, commentairesAjoutes);
|
566 |
}
|
568 |
}
|
567 |
} else if (type.equals("commentaire_modifiee")) {
|
569 |
} else if (type.equals("commentaire_modifiee")) {
|
568 |
if (info.getDonnee(0) != null) {
|
570 |
if (info.getDonnee(0) != null) {
|
569 |
Commentaire commentaire = (Commentaire) info.getDonnee(0);
|
571 |
Commentaire commentaire = (Commentaire) info.getDonnee(0);
|
570 |
ModelData commentaireDansGrille = grille.getStore().findModel("ccm_id_commentaire", commentaire.getId());
|
572 |
ModelData commentaireDansGrille = grille.getStore().findModel("ccm_id_commentaire", commentaire.getId());
|
571 |
int index = grille.getStore().indexOf(commentaireDansGrille);
|
573 |
int index = grille.getStore().indexOf(commentaireDansGrille);
|
572 |
grille.getStore().remove(commentaireDansGrille);
|
574 |
grille.getStore().remove(commentaireDansGrille);
|
573 |
String typeCommentaire = (String) commentaireDansGrille.get("_type_");
|
575 |
String typeCommentaire = (String) commentaireDansGrille.get("_type_");
|
574 |
ajouterDansGrille(commentaire, typeCommentaire, index);
|
576 |
ajouterDansGrille(commentaire, typeCommentaire, index);
|
575 |
}
|
577 |
}
|
576 |
} else if (type.equals("commentaire_ajoutee")) {
|
578 |
} else if (type.equals("commentaire_ajoutee")) {
|
577 |
if (info.getDonnee(0) != null) {
|
579 |
if (info.getDonnee(0) != null) {
|
578 |
Commentaire commentaire = (Commentaire) info.getDonnee(0);
|
580 |
Commentaire commentaire = (Commentaire) info.getDonnee(0);
|
579 |
ajouterDansGrille(commentaire);
|
581 |
ajouterDansGrille(commentaire);
|
580 |
}
|
582 |
}
|
581 |
} else if (info.getType().equals("modif_collection_a_commentaire")) {
|
583 |
} else if (info.getType().equals("modif_collection_a_commentaire")) {
|
582 |
InfoLogger.display("Modification des notes liées à la collection", info.toString());
|
584 |
InfoLogger.display("Modification des notes liées à la collection", info.toString());
|
583 |
initialiserGestionCommentaires();
|
585 |
initialiserGestionCommentaires();
|
584 |
} else if (info.getType().equals("suppression_collection_a_commentaire")) {
|
586 |
} else if (info.getType().equals("suppression_collection_a_commentaire")) {
|
585 |
InfoLogger.display("Suppression des notes liées à la collection", info.toString());
|
587 |
InfoLogger.display("Suppression des notes liées à la collection", info.toString());
|
586 |
initialiserGestionCommentaires();
|
588 |
initialiserGestionCommentaires();
|
587 |
} else if (info.getType().equals("ajout_collection_a_commentaire")) {
|
589 |
} else if (info.getType().equals("ajout_collection_a_commentaire")) {
|
588 |
InfoLogger.display("Ajout des notes liées à la collection", info.toString());
|
590 |
InfoLogger.display("Ajout des notes liées à la collection", info.toString());
|
589 |
initialiserGestionCommentaires();
|
591 |
initialiserGestionCommentaires();
|
590 |
}
|
592 |
}
|
591 |
}
|
593 |
}
|
592 |
|
594 |
|
593 |
public void peupler() {
|
595 |
public void peupler() {
|
594 |
grille.getStore().removeAll();
|
596 |
grille.getStore().removeAll();
|
595 |
grille.getStore().add(collection.getCommentairesLiees().toList());
|
597 |
grille.getStore().add(collection.getCommentairesLiees().toList());
|
596 |
grille.recalculate();
|
598 |
grille.recalculate();
|
597 |
layout();
|
599 |
layout();
|
598 |
InfoLogger.display(i18nC.chargementCommentaire(), i18nC.ok());
|
600 |
InfoLogger.display(i18nC.chargementCommentaire(), i18nC.ok());
|
599 |
}
|
601 |
}
|
600 |
|
602 |
|
601 |
public void collecter() {
|
603 |
public void collecter() {
|
602 |
if (etreAccede()) {
|
604 |
if (etreAccede()) {
|
603 |
int nbreCommentaire = grille.getStore().getCount();
|
605 |
int nbreCommentaire = grille.getStore().getCount();
|
604 |
for (int i = 0; i < nbreCommentaire; i++) {
|
606 |
for (int i = 0; i < nbreCommentaire; i++) {
|
605 |
ModelData relationCollectionACommentaire = grille.getStore().getAt(i);
|
607 |
ModelData relationCollectionACommentaire = grille.getStore().getAt(i);
|
606 |
CollectionACommentaire cac = new CollectionACommentaire(relationCollectionACommentaire, false);
|
608 |
CollectionACommentaire cac = new CollectionACommentaire(relationCollectionACommentaire, false);
|
607 |
if (relationCollectionACommentaire.get("_etat_") != null) {
|
609 |
if (relationCollectionACommentaire.get("_etat_") != null) {
|
608 |
if (relationCollectionACommentaire.get("_etat_").equals(aDonnee.ETAT_MODIFIE)) {
|
610 |
if (relationCollectionACommentaire.get("_etat_").equals(aDonnee.ETAT_MODIFIE)) {
|
609 |
corrigerChampsGrille(cac);// Nous modifions l'id_type
|
611 |
corrigerChampsGrille(cac);// Nous modifions l'id_type
|
610 |
commentairesModifies.put("id"+idGenere++, cac);
|
612 |
commentairesModifies.put("id"+idGenere++, cac);
|
611 |
}
|
613 |
}
|
612 |
if (relationCollectionACommentaire.get("_etat_").equals(aDonnee.ETAT_AJOUTE)) {
|
614 |
if (relationCollectionACommentaire.get("_etat_").equals(aDonnee.ETAT_AJOUTE)) {
|
613 |
corrigerChampsGrille(cac);// Nous modifions l'id_type
|
615 |
corrigerChampsGrille(cac);// Nous modifions l'id_type
|
614 |
commentairesAjoutes.put("id"+idGenere++, cac);
|
616 |
commentairesAjoutes.put("id"+idGenere++, cac);
|
615 |
}
|
617 |
}
|
616 |
// Initialisation de la grille
|
618 |
// Initialisation de la grille
|
617 |
relationCollectionACommentaire.set("_etat_", "");
|
619 |
relationCollectionACommentaire.set("_etat_", "");
|
618 |
}
|
620 |
}
|
619 |
}
|
621 |
}
|
620 |
grille.getStore().commitChanges();
|
622 |
grille.getStore().commitChanges();
|
621 |
}
|
623 |
}
|
622 |
}
|
624 |
}
|
623 |
|
625 |
|
624 |
private void corrigerChampsGrille(CollectionACommentaire relationCollectionACommentaire) {
|
626 |
private void corrigerChampsGrille(CollectionACommentaire relationCollectionACommentaire) {
|
625 |
String type = relationCollectionACommentaire.get("_type_");
|
627 |
String type = relationCollectionACommentaire.get("_type_");
|
626 |
relationCollectionACommentaire.setType(typeCombo.formaterTexteEnIdentifiants(type));
|
628 |
relationCollectionACommentaire.setType(typeCombo.formaterTexteEnIdentifiants(type));
|
627 |
relationCollectionACommentaire.setIdCollection(collection.getId());
|
629 |
relationCollectionACommentaire.setIdCollection(collection.getId());
|
628 |
}
|
630 |
}
|
629 |
|
631 |
|
630 |
public void soumettre() {
|
632 |
public void soumettre() {
|
631 |
if (mode.equals(Formulaire.MODE_MODIFIER)) {
|
633 |
if (mode.equals(Formulaire.MODE_MODIFIER)) {
|
632 |
if (commentairesAjoutes.size() == 0 && commentairesModifies.size() == 0 && commentairesSupprimes.size() == 0) {
|
634 |
if (commentairesAjoutes.size() == 0 && commentairesModifies.size() == 0 && commentairesSupprimes.size() == 0) {
|
633 |
//InfoLogger.display("Modification des notes liées", "Rien n'a été enregistré car le formulaire n'a pas été modifié.");
|
635 |
//InfoLogger.display("Modification des notes liées", "Rien n'a été enregistré car le formulaire n'a pas été modifié.");
|
634 |
} else {
|
636 |
} else {
|
635 |
mediateur.ajouterCollectionACommentaire(this, collection.getId(), commentairesAjoutes);
|
637 |
mediateur.ajouterCollectionACommentaire(this, collection.getId(), commentairesAjoutes);
|
636 |
mediateur.modifierCollectionACommentaire(this, commentairesModifies);
|
638 |
mediateur.modifierCollectionACommentaire(this, commentairesModifies);
|
637 |
mediateur.supprimerCollectionACommentaire(this, commentairesSupprimes);
|
639 |
mediateur.supprimerCollectionACommentaire(this, commentairesSupprimes);
|
638 |
}
|
640 |
}
|
639 |
}
|
641 |
}
|
640 |
}
|
642 |
}
|
641 |
|
643 |
|
642 |
private void actualiserGrille() {
|
644 |
private void actualiserGrille() {
|
643 |
if (mode.equals(Formulaire.MODE_MODIFIER)) {
|
645 |
if (mode.equals(Formulaire.MODE_MODIFIER)) {
|
644 |
mediateur.selectionnerCollectionACommentaire(this, collection.getId(), null);
|
646 |
mediateur.selectionnerCollectionACommentaire(this, collection.getId(), null);
|
645 |
} else {
|
647 |
} else {
|
646 |
grille.getStore().removeAll();
|
648 |
grille.getStore().removeAll();
|
647 |
layout();
|
649 |
layout();
|
648 |
}
|
650 |
}
|
649 |
}
|
651 |
}
|
650 |
}
|
652 |
}
|