357,6 → 357,25 |
institutionVue.rafraichir(structuresACharger); |
} |
|
public void afficherFormStructure(String structureId) { |
String mode = StructureForm.MODE_AJOUTER; |
if (structureId != null) { |
mode = StructureForm.MODE_MODIFIER; |
} |
|
panneauCentre.removeAll(); |
StructureForm structureForm = new StructureForm(this, mode); |
panneauCentre.add(structureForm); |
panneauCentre.setId(ComposantId.PANNEAU_STRUCTURE_FORM); |
|
if (mode.equals(StructureForm.MODE_MODIFIER)) { |
selectionnerStructure(structureForm, structureId); |
selectionnerStructureAPersonne(structureForm, structureId, StructureAPersonne.ROLE_EQUIPE); |
} |
|
panneauCentre.layout(); |
} |
|
public void clicListeStructure(Structure structure) { |
contenuPanneauCentre.rafraichir(structure); |
if (structure.getPersonnel() == null) { |
367,11 → 386,7 |
} |
|
public void clicAjouterStructure() { |
panneauCentre.removeAll(); |
StructureForm structureForm = new StructureForm(this, StructureForm.MODE_AJOUTER); |
panneauCentre.add(structureForm); |
panneauCentre.setId(ComposantId.PANNEAU_STRUCTURE_FORM); |
panneauCentre.layout(); |
afficherFormStructure(null); |
} |
|
public void clicModifierStructure(List<Structure> structureSelection) { |
380,19 → 395,10 |
} else if (structureSelection.size() > 1) { |
Info.display("Information", "Veuillez sélectionner une seule structure à la fois."); |
} else if (structureSelection.size() == 1) { |
panneauCentre.removeAll(); |
StructureForm structureForm = new StructureForm(this, StructureForm.MODE_MODIFIER); |
panneauCentre.add(structureForm); |
panneauCentre.setId(ComposantId.PANNEAU_STRUCTURE_FORM); |
|
selectionnerStructure(structureForm, structureSelection.get(0).getId()); |
selectionnerStructureAPersonne(structureForm, structureSelection.get(0).getId(), StructureAPersonne.ROLE_EQUIPE); |
|
panneauCentre.layout(); |
afficherFormStructure( structureSelection.get(0).getId()); |
} else { |
Info.display("Erreur", "Une erreur est survenue dans la méthode clicModifierStructure() du Médiateur."); |
} |
|
} |
|
public void clicSupprimerStructure(final Rafraichissable vue, final List<Structure> structureSelection) { |