# HG changeset patch # User Raimund Renkert # Date 1326130661 0 # Node ID 4967508928a2f236bedce6ac37366ee3df692456 # Parent 02a9104c045168679d7fca4ec8a93741b23a7c74 Fixed initial values of boolean properties. flys-client/trunk@3635 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 02a9104c0451 -r 4967508928a2 flys-client/ChangeLog --- a/flys-client/ChangeLog Mon Jan 09 17:29:56 2012 +0000 +++ b/flys-client/ChangeLog Mon Jan 09 17:37:41 2012 +0000 @@ -1,3 +1,8 @@ +2012-01-09 Raimund Renkert + + * src/main/java/de/intevation/flys/client/client/ui/chart/ChartPropertiesEditor.java: + Fixed initial values of boolean properties. + 2012-01-09 Raimund Renkert Implemented the validators more object oriented. diff -r 02a9104c0451 -r 4967508928a2 flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartPropertiesEditor.java --- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartPropertiesEditor.java Mon Jan 09 17:29:56 2012 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartPropertiesEditor.java Mon Jan 09 17:37:41 2012 +0000 @@ -213,9 +213,15 @@ BooleanProperty fixation = (BooleanProperty)pg.getPropertyByName("fixation"); FormItem fix = createBooleanProperty(fixation); - fix.setValue( + String fixValue = ((BooleanProperty) - origPg.getPropertyByName("fixation")).getValue()); + origPg.getPropertyByName("fixation")).getValue(); + if(fixValue.equals("true")) { + fix.setValue(true); + } + else { + fix.setValue(false); + } fix.addChangedHandler(new ChangedHandler() { public void onChanged(ChangedEvent e) { if ((Boolean)e.getValue()) { @@ -269,7 +275,13 @@ FormItem item = new FormItem(); if (setting instanceof BooleanProperty) { item = createBooleanProperty((BooleanProperty)setting); - item.setValue(((BooleanProperty)orig).getValue()); + String iValue = ((BooleanProperty)orig).getValue(); + if(iValue.equals("true")) { + item.setValue(true); + } + else { + item.setValue(false); + } } else if (setting instanceof DoubleProperty) { item = createDoubleProperty((DoubleProperty)setting); @@ -330,12 +342,6 @@ item.setLabelAsTitle(true); item.setTitleStyle("color:#000;"); item.setTitleAlign(Alignment.LEFT); -/* if(bp.getValue().equals("true")) { - item.setValue(true); - } - else { - item.setValue(false); - }*/ item.addChangedHandler(new ChangedHandler() { public void onChanged(ChangedEvent e) { String val;