Index: lutincommandline/src/java/org/codelutin/option/ui/ConfigTableModel.java diff -u lutincommandline/src/java/org/codelutin/option/ui/ConfigTableModel.java:1.3 lutincommandline/src/java/org/codelutin/option/ui/ConfigTableModel.java:1.4 --- lutincommandline/src/java/org/codelutin/option/ui/ConfigTableModel.java:1.3 Fri Feb 22 20:57:25 2008 +++ lutincommandline/src/java/org/codelutin/option/ui/ConfigTableModel.java Sun Feb 24 18:49:40 2008 @@ -77,7 +77,7 @@ } public ConfigTableModel(Config config, TypeModel type) { - this.config=config; + this.config = config; setType(type); } @@ -211,20 +211,26 @@ } ConfigPropertyKey key = getKey(row); Object val; - String valStr = String.valueOf(aValue).trim(); - try { - val = key.convert(key.getType(), valStr); - if (val !=null && val instanceof Integer) { - if (new Integer(0).equals(val) && !valStr.equals("0")) { - val = null; + + if (key.getType() ==aValue.getClass()) { + // we have directly the value, no conversion need + val = aValue; + } else { + String valStr = String.valueOf(aValue).trim(); + try { + val = key.convert(key.getType(), valStr); + if (val != null && val instanceof Integer) { + if (new Integer(0).equals(val) && !valStr.equals("0")) { + val = null; + } } + } catch (Exception e) { + val = null; } - } catch (Exception e) { - val = null; } //System.out.println(_("new Value for {0} : {1} --> {2} (oldValue:{3})", key.getKey(), valStr,val, key.getCurrentValue())); props.put(key, val); - fireTableRowsUpdated(row,row); + fireTableRowsUpdated(row, row); } }