| Line 9... |
Line 9... |
| 9 |
import org.tela_botanica.client.i18n.Constantes;
|
9 |
import org.tela_botanica.client.i18n.Constantes;
|
| 10 |
import org.tela_botanica.client.i18n.ErrorMessages;
|
10 |
import org.tela_botanica.client.i18n.ErrorMessages;
|
| 11 |
import org.tela_botanica.client.interfaces.Rafraichissable;
|
11 |
import org.tela_botanica.client.interfaces.Rafraichissable;
|
| 12 |
import org.tela_botanica.client.modeles.Collection;
|
12 |
import org.tela_botanica.client.modeles.Collection;
|
| 13 |
import org.tela_botanica.client.modeles.CollectionAPersonne;
|
13 |
import org.tela_botanica.client.modeles.CollectionAPersonne;
|
| - |
|
14 |
import org.tela_botanica.client.modeles.CollectionAPublication;
|
| - |
|
15 |
import org.tela_botanica.client.modeles.CollectionAPublicationListe;
|
| 14 |
import org.tela_botanica.client.modeles.CollectionListe;
|
16 |
import org.tela_botanica.client.modeles.CollectionListe;
|
| 15 |
import org.tela_botanica.client.modeles.Configuration;
|
17 |
import org.tela_botanica.client.modeles.Configuration;
|
| 16 |
import org.tela_botanica.client.modeles.Information;
|
18 |
import org.tela_botanica.client.modeles.Information;
|
| 17 |
import org.tela_botanica.client.modeles.MenuApplicationId;
|
19 |
import org.tela_botanica.client.modeles.MenuApplicationId;
|
| 18 |
import org.tela_botanica.client.modeles.Personne;
|
20 |
import org.tela_botanica.client.modeles.Personne;
|
| Line 486... |
Line 488... |
| 486 |
|
488 |
|
| 487 |
panneauCentre.getContenu().rafraichir(collectionsACharger);
|
489 |
panneauCentre.getContenu().rafraichir(collectionsACharger);
|
| Line 488... |
Line 490... |
| 488 |
}
|
490 |
}
|
| 489 |
|
- |
|
| 490 |
public void afficherFormCollection(String collectionId) {
|
- |
|
| 491 |
String mode = Formulaire.MODE_AJOUTER;
|
- |
|
| 492 |
if (collectionId != null) {
|
- |
|
| 493 |
mode = Formulaire.MODE_MODIFIER;
|
- |
|
| 494 |
}
|
491 |
|
| 495 |
|
492 |
public void afficherFormCollection(String collectionId) {
|
| 496 |
panneauCentre.removeAll();
|
493 |
panneauCentre.removeAll();
|
| Line 497... |
Line -... |
| 497 |
CollectionForm collectionForm = new CollectionForm(this, mode);
|
- |
|
| 498 |
panneauCentre.add(collectionForm);
|
- |
|
| 499 |
|
- |
|
| 500 |
if (mode.equals(Formulaire.MODE_MODIFIER)) {
|
- |
|
| 501 |
selectionnerCollection(collectionForm, collectionId);
|
494 |
CollectionForm collectionForm = new CollectionForm(this, collectionId);
|
| 502 |
}
|
495 |
panneauCentre.add(collectionForm);
|
| Line 503... |
Line 496... |
| 503 |
|
496 |
|
| 504 |
panneauCentre.layout();
|
497 |
panneauCentre.layout();
|
| - |
|
498 |
}
|
| - |
|
499 |
|
| - |
|
500 |
public void clicListeCollection(Collection collectionCliquee) {
|
| - |
|
501 |
panneauCentre.getContenu().rafraichir(collectionCliquee);
|
| 505 |
}
|
502 |
if (collectionCliquee != null) {
|
| Line 506... |
Line 503... |
| 506 |
|
503 |
selectionnerCollectionAPersonne(panneauCentre.getContenu(), collectionCliquee.getId(), null);
|
| 507 |
public void clicListeCollection(Collection collectionCliquee) {
|
504 |
selectionnerCollectionAPublication(panneauCentre.getContenu(), collectionCliquee.getId());
|
| 508 |
panneauCentre.getContenu().rafraichir(collectionCliquee);
|
505 |
}
|
| Line 581... |
Line 578... |
| 581 |
}
|
578 |
}
|
| 582 |
}
|
579 |
}
|
| Line 583... |
Line 580... |
| 583 |
|
580 |
|
| 584 |
//+----------------------------------------------------------------------------------------------------------------+
|
581 |
//+----------------------------------------------------------------------------------------------------------------+
|
| - |
|
582 |
// GESTION de la relation COLLECTION A PUBLICATION
|
| - |
|
583 |
|
| - |
|
584 |
public void selectionnerCollectionAPublication(Rafraichissable vueARafraichir, String collectionId) {
|
| - |
|
585 |
modele.selectionnerCollectionAPublication(vueARafraichir, collectionId);
|
| - |
|
586 |
}
|
| - |
|
587 |
|
| - |
|
588 |
public void ajouterCollectionAPublication(Rafraichissable vueARafraichir, String collectionId, CollectionAPublicationListe publicationsAjoutees) {
|
| - |
|
589 |
if (publicationsAjoutees != null && publicationsAjoutees.size() > 0) {
|
| - |
|
590 |
for (Iterator<String> it = publicationsAjoutees.keySet().iterator(); it.hasNext();) {
|
| - |
|
591 |
modele.ajouterCollectionAPublication(vueARafraichir, collectionId, (CollectionAPublication) publicationsAjoutees.get(it.next()));
|
| - |
|
592 |
}
|
| - |
|
593 |
}
|
| - |
|
594 |
}
|
| - |
|
595 |
|
| - |
|
596 |
public void modifierCollectionAPublication(Rafraichissable vueARafraichir, CollectionAPublicationListe publicationsModifiees) {
|
| - |
|
597 |
if (publicationsModifiees != null && publicationsModifiees.size() > 0) {
|
| - |
|
598 |
for (Iterator<String> it = publicationsModifiees.keySet().iterator(); it.hasNext();) {
|
| - |
|
599 |
modele.modifierCollectionAPublication(vueARafraichir, (CollectionAPublication) publicationsModifiees.get(it.next()));
|
| - |
|
600 |
}
|
| - |
|
601 |
}
|
| - |
|
602 |
}
|
| - |
|
603 |
|
| - |
|
604 |
public void supprimerCollectionAPersonne(Rafraichissable vueARafraichir, CollectionAPublicationListe publicationsSupprimees) {
|
| - |
|
605 |
if (publicationsSupprimees != null && publicationsSupprimees.size() > 0) {
|
| - |
|
606 |
String idCollectionAPublicationSeparesParVirgule = "" ;
|
| - |
|
607 |
for (Iterator<String> it = publicationsSupprimees.keySet().iterator(); it.hasNext();) {
|
| - |
|
608 |
idCollectionAPublicationSeparesParVirgule += publicationsSupprimees.get(it.next()).getId()+"," ;
|
| - |
|
609 |
}
|
| - |
|
610 |
modele.supprimerCollectionAPublication(vueARafraichir, idCollectionAPublicationSeparesParVirgule);
|
| - |
|
611 |
}
|
| - |
|
612 |
}
|
| - |
|
613 |
|
| - |
|
614 |
//+----------------------------------------------------------------------------------------------------------------+
|
| Line 585... |
Line 615... |
| 585 |
// GESTION de la relation COLLECTION A PUBLICATION
|
615 |
// GESTION de la relation COLLECTION A PUBLICATION
|
| 586 |
|
616 |
|
| Line 587... |
Line 617... |
| 587 |
//+----------------------------------------------------------------------------------------------------------------+
|
617 |
//+----------------------------------------------------------------------------------------------------------------+
|