I have my own toString method in my enumeration:
enum TaxRate implements Serializable { RATE23(23.0), ... private String s private BigDecimal rate private TaxRate(BigDecimal s) { this.s = s + "%" this.rate = s * 0.01 } public String toString() { return s }
Now, when I show bids in HTML, I get a good result, for example TAX: 23.0%.
But what happens when a user selects a tax with <select> , and the value sent is ie 23.0% - this is what Grails cannot create / get an instance of TaxRate ...
What should I override to support this custom mapping? An attempt to override valueOf(String) failed.
source share