branch feature/7610-2 updated (437751b -> b15fb6b)
This is an automated email from the git hooks/post-receive script. New change to branch feature/7610-2 in repository observe. See http://git.codelutin.com/observe.git from 437751b chargement des données des combo et listes dans les écrans de référentiel (refs #7610) new b15fb6b mise à jour de la liste de référentiels après modif, suppression ou ajout (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 b15fb6b4e80a3c85facb91404671a8a2c1c112ae Author: Kevin Morin <morin@codelutin.com> Date: Fri Oct 16 17:02:21 2015 +0200 mise à jour de la liste de référentiels après modif, suppression ou ajout (refs #7610) Summary of changes: .../ui/content/ref/ContentReferenceUIHandler.java | 42 ++++++++++++---------- 1 file changed, 24 insertions(+), 18 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 feature/7610-2 in repository observe. See http://git.codelutin.com/observe.git commit b15fb6b4e80a3c85facb91404671a8a2c1c112ae Author: Kevin Morin <morin@codelutin.com> Date: Fri Oct 16 17:02:21 2015 +0200 mise à jour de la liste de référentiels après modif, suppression ou ajout (refs #7610) --- .../ui/content/ref/ContentReferenceUIHandler.java | 42 ++++++++++++---------- 1 file changed, 24 insertions(+), 18 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 693bc2e..21f6501 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 @@ -57,8 +57,6 @@ import org.apache.commons.lang3.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.nuiton.decorator.Decorator; -import org.nuiton.decorator.DecoratorUtil; -import org.nuiton.decorator.JXPathDecorator; import org.nuiton.util.beans.Binder; import org.nuiton.util.beans.BinderFactory; @@ -127,8 +125,12 @@ public class ContentReferenceUIHandler<E extends ReferentialDto> extends Content } }; + private ReferentialContentUIInitializer<E, ContentReferenceUI<E>> uiInitializer; + public ContentReferenceUIHandler(ContentReferenceUI<E> ui) { super(ui, null, null); + uiInitializer = new ReferentialContentUIInitializer<>(ui); + } public static <E extends IdDto> void showUsagesForDelete( @@ -198,26 +200,29 @@ public class ContentReferenceUIHandler<E extends ReferentialDto> extends Content public void selectBean(ReferenceDto<E> selectedReference) { - FormDto<E> formDto; - if (getDataSource().canWriteReferential()) { - formDto = getReferentialService().loadToEdit(getBeanType(), selectedReference.getId()); - } else { - formDto = getReferentialService().loadToRead(getBeanType(), selectedReference.getId()); - } + if (selectedReference != null) { - E selectedBean = formDto.getForm(); + FormDto<E> formDto; + if (getDataSource().canWriteReferential()) { + formDto = getReferentialService().loadToEdit(getBeanType(), selectedReference.getId()); + } else { + formDto = getReferentialService().loadToRead(getBeanType(), selectedReference.getId()); + } - getModel().setSelectedBean(selectedBean); + E selectedBean = formDto.getForm(); - // copy right now the selected bean to the model bean to respect contract - // of parent handler (for delation or save objectOperation...) - //FIXME -// getLoadBinder().load(selectedBean, getBean(), true); + getModel().setSelectedBean(selectedBean); + + // copy right now the selected bean to the model bean to respect contract + // of parent handler (for delation or save objectOperation...) + //FIXME + // getLoadBinder().load(selectedBean, getBean(), true); - Binder<E, E> binder = BinderFactory.newBinder(getBeanType()); - binder.copy(selectedBean, getBean()); + Binder<E, E> binder = BinderFactory.newBinder(getBeanType()); + binder.copy(selectedBean, getBean()); - //TODO update data cache + //TODO update data cache + } } @@ -423,7 +428,6 @@ public class ContentReferenceUIHandler<E extends ReferentialDto> extends Content @Override public void initUI() throws Exception { - ReferentialContentUIInitializer<E, ContentReferenceUI<E>> uiInitializer = new ReferentialContentUIInitializer<E, ContentReferenceUI<E>>(getUi()); uiInitializer.initUI(); ContentReferenceUI<E> ui = getUi(); @@ -619,6 +623,8 @@ public class ContentReferenceUIHandler<E extends ReferentialDto> extends Content removeAllMessages(ui); addInfoMessage(t("observe.message.referentiel.editable")); } + + uiInitializer.referentialDataUpdated(); } @Override -- 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