branch develop updated (c9f48c3 -> 14be8e7)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository observe. See http://git.codelutin.com/observe.git from c9f48c3 mise à jour de la liste de référentiels après modif, suppression ou ajout (refs #7610) new 14be8e7 correction de la copie des bean (refs #7610) The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit 14be8e70f59523f3e994345b39dbb261916dc5a2 Author: Kevin Morin <morin@codelutin.com> Date: Fri Oct 16 17:33:18 2015 +0200 correction de la copie des bean (refs #7610) Summary of changes: .../ui/content/ref/ContentReferenceUIHandler.java | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@list.forge.codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository observe. See http://git.codelutin.com/observe.git commit 14be8e70f59523f3e994345b39dbb261916dc5a2 Author: Kevin Morin <morin@codelutin.com> Date: Fri Oct 16 17:33:18 2015 +0200 correction de la copie des bean (refs #7610) --- .../ui/content/ref/ContentReferenceUIHandler.java | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/observe-application-swing/src/main/java/fr/ird/observe/ui/content/ref/ContentReferenceUIHandler.java b/observe-application-swing/src/main/java/fr/ird/observe/ui/content/ref/ContentReferenceUIHandler.java index 21f6501..57aef51 100644 --- a/observe-application-swing/src/main/java/fr/ird/observe/ui/content/ref/ContentReferenceUIHandler.java +++ b/observe-application-swing/src/main/java/fr/ird/observe/ui/content/ref/ContentReferenceUIHandler.java @@ -36,7 +36,6 @@ import fr.ird.observe.services.dto.referential.I18nReferentialDto; import fr.ird.observe.services.dto.referential.ProgramDto; import fr.ird.observe.services.dto.referential.ProgramDtos; import fr.ird.observe.services.dto.referential.ReferentialDto; -import fr.ird.observe.services.dto.referential.ReferentialDtos; import fr.ird.observe.services.dto.referential.VesselSizeCategoryDto; import fr.ird.observe.services.service.DataNotFoundException; import fr.ird.observe.services.service.ReferentialService; @@ -532,7 +531,8 @@ public class ContentReferenceUIHandler<E extends ReferentialDto> extends Content // creation mode FormDto<E> formDto = getReferentialService().preCreate(getBeanType()); getModel().setFormDto(formDto); - ReferentialDtos.copyReferentialDto(formDto.getForm(), bean); + + copyIntoBean(formDto.getForm(), bean); } else { addInfoMessage(t("observe.message.updating.referentiel")); @@ -589,7 +589,7 @@ public class ContentReferenceUIHandler<E extends ReferentialDto> extends Content log.debug("Will create new entity [" + getModel().getBeanType() + "]"); } - ReferentialDtos.copyReferentialDto(null, getBean()); + copyIntoBean(null, getBean()); // on demarre l'edition ui.startEdit(null); @@ -604,7 +604,7 @@ public class ContentReferenceUIHandler<E extends ReferentialDto> extends Content model.setMode(ContentMode.UPDATE); } - ReferentialDtos.copyReferentialDto(model.getSelectedBean(), getBean()); + copyIntoBean(model.getSelectedBean(), getBean()); getUi().startEdit(null); } @@ -647,7 +647,8 @@ public class ContentReferenceUIHandler<E extends ReferentialDto> extends Content // then resynch the selected bean to edit bean (used for // example to delete)... // repush selected bean to bean - ReferentialDtos.copyReferentialDto(model.getSelectedBean(), getBean()); + + copyIntoBean(model.getSelectedBean(), getBean()); } } @@ -877,6 +878,11 @@ public class ContentReferenceUIHandler<E extends ReferentialDto> extends Content ContentReferenceUI.LIST_VIEW; } + protected void copyIntoBean(E source, E target) { + Binder<E, E> binder = BinderFactory.newBinder(getBeanType()); + binder.copy(source, target); + } + protected ReferentialService getReferentialService() { return ObserveSwingApplicationContext.get().newService(ReferentialService.class); } -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@list.forge.codelutin.com>.
participants (1)
-
codelutin.com scm