jidefx-oss
jidefx-oss copied to clipboard
DoubleField - Cannot make it empty once number are entered?
If remove all text and move the focus, it bring back to one that was there. Is there any way to make it allow empty?
I know I can enter zero (0) value but zero and empty are different sometimes.
Thanks.
I see your point. You are certainly correct. The reason we did this way is because the FormattedTextField constantly checks the text to make sure it is at the correct format so we wish there is always a value there. commitEdit method is the that that checks the value. If the value converted from the text is null, it will return false and then the field will revert to the previous value. You probably can override the commitEdit to allow null for now. We will have to go through all the code to prevent possible NPE when the value is null.
Thanks. Overriding the commitEdit works for me.