Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe Commits: d6dfc879 by tchemit at 2020-04-17T11:01:48+02:00 FOB sans objectOperation fait planter la consolidation des données - See #1469 - - - - - 7a6a3bb3 by tchemit at 2020-04-17T11:03:07+02:00 Les températures ne sont pas bien restituées... - Closes #1470 - - - - - cc8facd7 by tchemit at 2020-04-17T11:04:31+02:00 Remove bad and unusefull code - - - - - 2 changed files: - client-datasource-editor-api/src/main/java/fr/ird/observe/client/datasource/editor/content/ContentUIInitializer.java - services-local/src/main/java/fr/ird/observe/services/local/service/actions/consolidate/ConsolidateDataServiceLocal.java Changes: ===================================== client-datasource-editor-api/src/main/java/fr/ird/observe/client/datasource/editor/content/ContentUIInitializer.java ===================================== @@ -327,7 +327,7 @@ public class ContentUIInitializer<UI extends ContentUI> implements WithClientCon if (editor.getBean() != null) { if (UIHelper.isBindingFromBean(editor)) { - editor.getModel().addPropertyChangeListener(propertyName, e -> { + ((JavaBean)editor.getBean()).addPropertyChangeListener(propertyName, e -> { Float oldValue = editor.getModel().getTemperature(); Float newValue = (Float) e.getNewValue(); if (!Objects.equals(oldValue, newValue)) { @@ -342,17 +342,6 @@ public class ContentUIInitializer<UI extends ContentUI> implements WithClientCon if (StringUtils.isEmpty(editor.getProperty())) { editor.setProperty(editor.getName()); } - if (editor.getBean() != null) { - if (UIHelper.isBindingFromBean(editor)) { - editor.getModel().addPropertyChangeListener(editor.getProperty(), e -> { - String oldValue = editor.getText(); - String newValue = (String) e.getNewValue(); - if (!Objects.equals(oldValue, newValue)) { - editor.setText(newValue); - } - }); - } - } editor.setMinimumSize(new Dimension(50, 5 * 24)); editor.getTextEditor().setRows(4); } @@ -361,36 +350,12 @@ public class ContentUIInitializer<UI extends ContentUI> implements WithClientCon if (StringUtils.isEmpty(editor.getProperty())) { editor.setProperty(editor.getName()); } - - if (editor.getBean() != null) { - if (UIHelper.isBindingFromBean(editor)) { - editor.getModel().addPropertyChangeListener(editor.getProperty(), e -> { - String oldValue = editor.getText(); - String newValue = (String) e.getNewValue(); - if (!Objects.equals(oldValue, newValue)) { - editor.setText(newValue); - } - }); - } - } } protected void init(UrlEditor editor) { if (StringUtils.isEmpty(editor.getProperty())) { editor.setProperty(editor.getName()); } - - if (editor.getBean() != null) { - if (UIHelper.isBindingFromBean(editor)) { - editor.getModel().addPropertyChangeListener(editor.getProperty(), e -> { - String oldValue = editor.getText(); - String newValue = (String) e.getNewValue(); - if (!Objects.equals(oldValue, newValue)) { - editor.setText(newValue); - } - }); - } - } } private void init(JLabel editor) { ===================================== services-local/src/main/java/fr/ird/observe/services/local/service/actions/consolidate/ConsolidateDataServiceLocal.java ===================================== @@ -375,6 +375,12 @@ public class ConsolidateDataServiceLocal extends ObserveServiceLocal implements private void updateDcp(FloatingObject dcp, ConsolidationActivitySeineDataContext activityContext) { + if (dcp.getObjectOperation() == null) { + log.warn("**********************"); + log.warn(String.format("Floating object %s has no object operation....", dcp.getTopiaId())); + log.warn("**********************"); + return; + } FloatingObjectConsolidateEngine floatingObjectConsolidateEngine = activityContext.floatingObjectConsolidateEngine; ReferentialLocale referentialLocale = getReferentialLocale(); View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/1d90522b3fe579efe4b3f5b08... -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/1d90522b3fe579efe4b3f5b08... You're receiving this email because of your account on gitlab.com.