| Line 19... |
Line 19... |
| 19 |
import org.tela_botanica.client.vues.structure.StructureForm;
|
19 |
import org.tela_botanica.client.vues.structure.StructureForm;
|
| Line 20... |
Line 20... |
| 20 |
|
20 |
|
| 21 |
import com.extjs.gxt.ui.client.event.BaseEvent;
|
21 |
import com.extjs.gxt.ui.client.event.BaseEvent;
|
| 22 |
import com.extjs.gxt.ui.client.event.Events;
|
22 |
import com.extjs.gxt.ui.client.event.Events;
|
| 23 |
import com.extjs.gxt.ui.client.event.Listener;
|
- |
|
| 24 |
import com.extjs.gxt.ui.client.widget.Info;
|
23 |
import com.extjs.gxt.ui.client.event.Listener;
|
| 25 |
import com.extjs.gxt.ui.client.widget.MessageBox;
|
24 |
import com.extjs.gxt.ui.client.widget.MessageBox;
|
| 26 |
import com.extjs.gxt.ui.client.widget.TabItem;
|
25 |
import com.extjs.gxt.ui.client.widget.TabItem;
|
| 27 |
import com.extjs.gxt.ui.client.widget.TabPanel;
|
26 |
import com.extjs.gxt.ui.client.widget.TabPanel;
|
| 28 |
import com.extjs.gxt.ui.client.widget.form.FieldSet;
|
27 |
import com.extjs.gxt.ui.client.widget.form.FieldSet;
|
| 29 |
import com.extjs.gxt.ui.client.widget.form.TextField;
|
28 |
import com.extjs.gxt.ui.client.widget.form.TextField;
|
| 30 |
import com.extjs.gxt.ui.client.widget.form.FormPanel.LabelAlign;
|
29 |
import com.extjs.gxt.ui.client.widget.form.FormPanel.LabelAlign;
|
| 31 |
import com.extjs.gxt.ui.client.widget.layout.FormData;
|
30 |
import com.extjs.gxt.ui.client.widget.layout.FormData;
|
| Line 32... |
Line 31... |
| 32 |
import com.google.gwt.core.client.GWT;
|
31 |
import com.google.gwt.user.client.Window;
|
| Line 33... |
Line 32... |
| 33 |
|
32 |
|
| 34 |
public class CollectionForm extends Formulaire implements Rafraichissable {
|
33 |
public class CollectionForm extends Formulaire implements Rafraichissable {
|
| Line 260... |
Line 259... |
| 260 |
}
|
259 |
}
|
| 261 |
String infoType = info.getType();
|
260 |
String infoType = info.getType();
|
| Line 262... |
Line 261... |
| 262 |
|
261 |
|
| 263 |
if (infoType.equals("modif_collection")) {
|
262 |
if (infoType.equals("modif_collection")) {
|
| - |
|
263 |
InfoLogger.display("Modification d'une collection", info.toString());
|
| 264 |
InfoLogger.display("Modification d'une collection", info.toString());
|
264 |
repandreRafraichissement();
|
| 265 |
} else if (infoType.equals("selection_collection")) {
|
265 |
} else if (infoType.equals("selection_collection")) {
|
| 266 |
InfoLogger.display("Modification d'une collection", info.toString());
|
266 |
InfoLogger.display("Modification d'une collection", info.toString());
|
| 267 |
if (info.getDonnee(0) != null) {
|
267 |
if (info.getDonnee(0) != null) {
|
| 268 |
collection = (Collection) info.getDonnee(0);
|
268 |
collection = (Collection) info.getDonnee(0);
|
| Line 313... |
Line 313... |
| 313 |
boolean formulaireValide = verifierFormulaire();
|
313 |
boolean formulaireValide = verifierFormulaire();
|
| Line 314... |
Line 314... |
| 314 |
|
314 |
|
| 315 |
if (formulaireValide) {
|
315 |
if (formulaireValide) {
|
| 316 |
// Collecte des données du formulaire
|
316 |
// Collecte des données du formulaire
|
| 317 |
Collection collectionAEnregistrer = collecterCollection();
|
- |
|
| - |
|
317 |
Collection collectionAEnregistrer = collecterCollection();
|
| 318 |
|
318 |
//Window.alert(collectionAEnregistrer.getDescription());
|
| 319 |
if (mode.equals(MODE_AJOUTER)) {
|
319 |
if (mode.equals(MODE_AJOUTER)) {
|
| 320 |
mediateur.ajouterCollection(this, collectionAEnregistrer);
|
320 |
mediateur.ajouterCollection(this, collectionAEnregistrer);
|
| 321 |
} else if (mode.equals(MODE_MODIFIER)) {
|
321 |
} else if (mode.equals(MODE_MODIFIER)) {
|
| 322 |
if (collectionAEnregistrer == null) {
|
322 |
if (collectionAEnregistrer == null) {
|
| Line 406... |
Line 406... |
| 406 |
ArrayList<String> messages = new ArrayList<String>();
|
406 |
ArrayList<String> messages = new ArrayList<String>();
|
| 407 |
messages.addAll(generalOnglet.verifier());
|
407 |
messages.addAll(generalOnglet.verifier());
|
| 408 |
messages.addAll(personneOnglet.verifier());
|
408 |
messages.addAll(personneOnglet.verifier());
|
| 409 |
return messages;
|
409 |
return messages;
|
| 410 |
}
|
410 |
}
|
| - |
|
411 |
|
| - |
|
412 |
private void repandreRafraichissement() {
|
| - |
|
413 |
if (vueExterneARafraichirApresValidation != null) {
|
| - |
|
414 |
String type = "modif_collection";
|
| - |
|
415 |
if (mode.equals(Formulaire.MODE_AJOUTER)) {
|
| - |
|
416 |
type = "ajout_collection";
|
| - |
|
417 |
}
|
| - |
|
418 |
Information info = new Information(type);
|
| - |
|
419 |
info.setDonnee(0, collection);
|
| - |
|
420 |
vueExterneARafraichirApresValidation.rafraichir(info);
|
| - |
|
421 |
}
|
| - |
|
422 |
}
|
| 411 |
}
|
423 |
}
|
| 412 |
|
424 |
|