This is an automated email from the git hooks/post-receive script. New commit to branch feature/7615-LL-VerifEcranSchemaPalangre in repository tutti. See http://git.codelutin.com/tutti.git commit a0de51aba14d15cbf31a83ab97d72cf1d59f6268 Author: Sylvain Bavencoff <bavencoff@codelutin.com> Date: Thu Mar 10 16:38:41 2016 +0100 - Charger les références dans le modél principal et le sous modél du détail avançon - Correction de la synchronisation des sections du tableau sur le bean du model (see #7615). --- .../impl/longline/LonglineDetailCompositionUIHandler.java | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/observe-application-swing/src/main/java/fr/ird/observe/ui/content/impl/longline/LonglineDetailCompositionUIHandler.java b/observe-application-swing/src/main/java/fr/ird/observe/ui/content/impl/longline/LonglineDetailCompositionUIHandler.java index 7c415ef..b76bee7 100644 --- a/observe-application-swing/src/main/java/fr/ird/observe/ui/content/impl/longline/LonglineDetailCompositionUIHandler.java +++ b/observe-application-swing/src/main/java/fr/ird/observe/ui/content/impl/longline/LonglineDetailCompositionUIHandler.java @@ -64,6 +64,7 @@ import java.util.ArrayList; import java.util.LinkedHashSet; import java.util.LinkedList; import java.util.List; +import java.util.stream.Collectors; import static org.nuiton.i18n.I18n.t; @@ -412,6 +413,9 @@ public class LonglineDetailCompositionUIHandler extends ContentUIHandler<SetLong SetLonglineDetailCompositionService setLonglineService = getSetLonglineDetailCompositionService(); Form<SetLonglineDetailCompositionDto> setLonglineDtoForm = setLonglineService.loadForm(setId); + + loadReferentialReferenceSetsInModel(setLonglineDtoForm); + getModel().setForm(setLonglineDtoForm); SetLonglineDetailCompositionDto bean = getBean(); @@ -420,7 +424,9 @@ public class LonglineDetailCompositionUIHandler extends ContentUIHandler<SetLong //FIXME Voir comment gérer ça Form<BranchlineDto> branchlineDtoForm = Form.newFormDto(BranchlineDto.class, null, null, null); - getUi().getBranchlineDetailUI().getModel().setForm(branchlineDtoForm); + BranchlineUIModel branchlineUIModel = getUi().getBranchlineDetailUI().getModel(); + branchlineUIModel.setReferentialReferenceSets(getModel().getReferentialReferenceSets()); + branchlineUIModel.setForm(branchlineDtoForm); //FIXME Validate this default date if (log.isInfoEnabled()) { @@ -613,6 +619,12 @@ public class LonglineDetailCompositionUIHandler extends ContentUIHandler<SetLong sectionsTableModel.rearrangeIds(sections); sectionsTableModel.setData(sections); + List<SectionDto> sectionDtos = sections.stream() + .map(SectionWithTemplate::getDelegate) + .collect(Collectors.toList()); + + getBean().addAllSection(sectionDtos); + getModel().setModified(true); } finally { @@ -673,6 +685,7 @@ public class LonglineDetailCompositionUIHandler extends ContentUIHandler<SetLong try { getSectionsTableModel().setData(Lists.<SectionWithTemplate>newArrayList()); + getBean().getSection().clear(); getModel().setModified(true); } finally { -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.