Standardise 'edit' cell dialogue with 'toNumber()' behavior
This commit is contained in:
parent
e62bb7ac0e
commit
5afd93e2d1
@ -103,7 +103,11 @@ public class EditOneCellCommand extends Command {
|
|||||||
Serializable value = null;
|
Serializable value = null;
|
||||||
|
|
||||||
if ("number".equals(type)) {
|
if ("number".equals(type)) {
|
||||||
value = Double.parseDouble(valueString);
|
try {
|
||||||
|
value = Long.parseLong(valueString);
|
||||||
|
} catch (NumberFormatException e) {
|
||||||
|
value = Double.parseDouble(valueString);
|
||||||
|
}
|
||||||
} else if ("boolean".equals(type)) {
|
} else if ("boolean".equals(type)) {
|
||||||
value = "true".equalsIgnoreCase(valueString);
|
value = "true".equalsIgnoreCase(valueString);
|
||||||
} else if ("date".equals(type)) {
|
} else if ("date".equals(type)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user