This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository tutti. See http://git.codelutin.com/tutti.git commit 0f8bb342beef705f9ac9520100bc30ba09eb3cd3 Author: Tony CHEMIT <chemit@codelutin.com> Date: Fri Nov 20 11:34:38 2015 +0100 little improvments --- .../src/main/java/fr/ird/observe/ObserveRunner.java | 3 ++- .../main/java/fr/ird/observe/ui/content/ContentUIHandler.java | 11 +++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/observe-application-swing/src/main/java/fr/ird/observe/ObserveRunner.java b/observe-application-swing/src/main/java/fr/ird/observe/ObserveRunner.java index be74bfe..104ceef 100644 --- a/observe-application-swing/src/main/java/fr/ird/observe/ObserveRunner.java +++ b/observe-application-swing/src/main/java/fr/ird/observe/ObserveRunner.java @@ -35,6 +35,7 @@ import org.apache.commons.beanutils.ConvertUtils; import org.apache.commons.beanutils.Converter; import org.apache.commons.beanutils.converters.DateConverter; import org.apache.commons.io.FileUtils; +import org.apache.commons.lang3.BooleanUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.log4j.LogManager; @@ -327,7 +328,7 @@ public abstract class ObserveRunner extends ApplicationRunner { Boolean.class, ObserveCLAction.ActionDefinition.H2_SERVER_MODE.name()); - if (h2ServerMode != null && h2ServerMode) { + if (BooleanUtils.isTrue(h2ServerMode)) { // starts in h2 server mode diff --git a/observe-application-swing/src/main/java/fr/ird/observe/ui/content/ContentUIHandler.java b/observe-application-swing/src/main/java/fr/ird/observe/ui/content/ContentUIHandler.java index 5f1c03f..8ea91ce 100644 --- a/observe-application-swing/src/main/java/fr/ird/observe/ui/content/ContentUIHandler.java +++ b/observe-application-swing/src/main/java/fr/ird/observe/ui/content/ContentUIHandler.java @@ -50,6 +50,7 @@ import jaxx.runtime.swing.editor.bean.BeanComboBox; import jaxx.runtime.swing.editor.bean.BeanListHeader; import jaxx.runtime.validator.swing.SwingValidatorMessageTableModel; import jaxx.runtime.validator.swing.SwingValidatorUtil; +import org.apache.commons.lang3.BooleanUtils; import org.apache.commons.lang3.reflect.ConstructorUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -888,10 +889,12 @@ public abstract class ContentUIHandler<E extends IdDto> { List<ReferenceDto<R>> data; FormDto<E> formDto = getModel().getFormDto(); - if (noLoad != null && noLoad || formDto == null) { + String propertyName = comboBox.getProperty(); + + if (BooleanUtils.isTrue(noLoad) || formDto == null) { if (log.isInfoEnabled()) { - log.info("Skip loading of entity list [" + dtoClass.getName() + "] (listNoLoad property found)"); + log.info(String.format("Skip loading of entity list [%s-%s] (listNoLoad property found or form is null)", dtoClass.getSimpleName(), propertyName)); } data = Collections.emptyList(); @@ -900,7 +903,7 @@ public abstract class ContentUIHandler<E extends IdDto> { data = new ArrayList<>(); // get complete data list from service - Optional<ReferenceSetDto<R>> optionalReferenceSetDto = formDto.tryToGetReferenceSetDto(dtoClass, comboBox.getProperty()); + Optional<ReferenceSetDto<R>> optionalReferenceSetDto = formDto.tryToGetReferenceSetDto(dtoClass, propertyName); if (optionalReferenceSetDto.isPresent()) { @@ -913,7 +916,7 @@ public abstract class ContentUIHandler<E extends IdDto> { } if (log.isInfoEnabled()) { - log.info("entity list [" + dtoClass.getName() + "] : " + data.size()); + log.info(String.format("entity list [%s-%s] : %d", dtoClass.getSimpleName(), propertyName, data.size())); } comboBox.setData(data); -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.