Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe

Commits:

2 changed files:

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
    327 327
     
    
    328 328
             if (editor.getBean() != null) {
    
    329 329
                 if (UIHelper.isBindingFromBean(editor)) {
    
    330
    -                editor.getModel().addPropertyChangeListener(propertyName, e -> {
    
    330
    +                ((JavaBean)editor.getBean()).addPropertyChangeListener(propertyName, e -> {
    
    331 331
                         Float oldValue = editor.getModel().getTemperature();
    
    332 332
                         Float newValue = (Float) e.getNewValue();
    
    333 333
                         if (!Objects.equals(oldValue, newValue)) {
    
    ... ... @@ -342,17 +342,6 @@ public class ContentUIInitializer<UI extends ContentUI> implements WithClientCon
    342 342
             if (StringUtils.isEmpty(editor.getProperty())) {
    
    343 343
                 editor.setProperty(editor.getName());
    
    344 344
             }
    
    345
    -        if (editor.getBean() != null) {
    
    346
    -            if (UIHelper.isBindingFromBean(editor)) {
    
    347
    -                editor.getModel().addPropertyChangeListener(editor.getProperty(), e -> {
    
    348
    -                    String oldValue = editor.getText();
    
    349
    -                    String newValue = (String) e.getNewValue();
    
    350
    -                    if (!Objects.equals(oldValue, newValue)) {
    
    351
    -                        editor.setText(newValue);
    
    352
    -                    }
    
    353
    -                });
    
    354
    -            }
    
    355
    -        }
    
    356 345
             editor.setMinimumSize(new Dimension(50, 5 * 24));
    
    357 346
             editor.getTextEditor().setRows(4);
    
    358 347
         }
    
    ... ... @@ -361,36 +350,12 @@ public class ContentUIInitializer<UI extends ContentUI> implements WithClientCon
    361 350
             if (StringUtils.isEmpty(editor.getProperty())) {
    
    362 351
                 editor.setProperty(editor.getName());
    
    363 352
             }
    
    364
    -
    
    365
    -        if (editor.getBean() != null) {
    
    366
    -            if (UIHelper.isBindingFromBean(editor)) {
    
    367
    -                editor.getModel().addPropertyChangeListener(editor.getProperty(), e -> {
    
    368
    -                    String oldValue = editor.getText();
    
    369
    -                    String newValue = (String) e.getNewValue();
    
    370
    -                    if (!Objects.equals(oldValue, newValue)) {
    
    371
    -                        editor.setText(newValue);
    
    372
    -                    }
    
    373
    -                });
    
    374
    -            }
    
    375
    -        }
    
    376 353
         }
    
    377 354
     
    
    378 355
         protected void init(UrlEditor editor) {
    
    379 356
             if (StringUtils.isEmpty(editor.getProperty())) {
    
    380 357
                 editor.setProperty(editor.getName());
    
    381 358
             }
    
    382
    -
    
    383
    -        if (editor.getBean() != null) {
    
    384
    -            if (UIHelper.isBindingFromBean(editor)) {
    
    385
    -                editor.getModel().addPropertyChangeListener(editor.getProperty(), e -> {
    
    386
    -                    String oldValue = editor.getText();
    
    387
    -                    String newValue = (String) e.getNewValue();
    
    388
    -                    if (!Objects.equals(oldValue, newValue)) {
    
    389
    -                        editor.setText(newValue);
    
    390
    -                    }
    
    391
    -                });
    
    392
    -            }
    
    393
    -        }
    
    394 359
         }
    
    395 360
     
    
    396 361
         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
    375 375
     
    
    376 376
         private void updateDcp(FloatingObject dcp, ConsolidationActivitySeineDataContext activityContext) {
    
    377 377
     
    
    378
    +        if (dcp.getObjectOperation() == null) {
    
    379
    +            log.warn("**********************");
    
    380
    +            log.warn(String.format("Floating object %s has no object operation....", dcp.getTopiaId()));
    
    381
    +            log.warn("**********************");
    
    382
    +            return;
    
    383
    +        }
    
    378 384
             FloatingObjectConsolidateEngine floatingObjectConsolidateEngine = activityContext.floatingObjectConsolidateEngine;
    
    379 385
     
    
    380 386
             ReferentialLocale referentialLocale = getReferentialLocale();