Hi there. Great component! I need to represent data in an exponential notat

Hi there. Great component! I need to represent data in an exponential notation after a callback. May I?

Anyway I tried to use
setDecimalFormat(new DecimalFormat(“###E0”));
or by any other pattern.
There’s an error “divide /0”.

Hello Simone,

And thanks for using SuperFields! When it comes to representing data with exponential (engineering) notation in SuperBigDecimalField, it is possible to enter numbers using it (by default that option is switched off, turn it on by calling setExponentSeparator(char separator). However, this only applies to entering the numbers, there is currently no way to display numbers not entered this way (say, 1000 as 1e3). If you think this is a feature that would be useful, please submit an issue in github.

Similarly, if there are errors with setDecimalFormat, please file a bug report in github. It will make my life easier if you include a minimum code that fails.

Thank you!

Just to let you know, the bug has been fixed with version 0.13.0, which is now out. Please try it out and report further issues on GitHub :)

thanks Miki setDecimalFormat(.) /0 issue is solved now! values are now shown in a scientific way according to my pattern.

Just one more question: my superbigdecimalCUSTOMfield won’t accept now more than 1 exponential digit by scientific notation.

f.i.
I can type anything like 1.000E-2 (1 exp digit)
I cannot type 1.123E-12 (2 exp digits are not allowed, blocked by field event listener).

The same source code (setters/witthers I mean) using the previous 0.11 release of your component works right (2 exp digits are allowed).

Also I tried to set up each .withXXX just like your demo source code, but any good news about it

thanks

Apparently I introduced a regression when tweaking the regexps. I created an issue in GitHub (https://github.com/vaadin-miki/super-fields/issues/369). I hope to fix it by the end of the month with release 0.13.1.