Groovy / Grails autoconvert NaN string for double field

I want users to edit a duplicate data field in a Grails view. I want to enable Double.NaN (for void values).

There is a special char, similar to a diamond with a question mark in it (in HTML), which acts like NaN, but - well - users will not find it on their keys.

In Java, it works with Double.valueOf("NaN"). But entering NaN in the input field will throw an IllegalArgumentException in which "NaN" is an unsurpassed number.

What method is called to convert? Which key allows you to auto-convert it to double?

+1
source share
1 answer

Double Double nullable:true 'null', " ".

NaN, , . http://ishanf.tumblr.com/post/434379583/custom-property-editor-for-grails.

+3

All Articles