Hi Tuti,
Apologies for the lack of documentation on this...
So, ultimately the rowOfFields fragment that you're using delegates to the field widget (
code here). This supports passing the following things in its configuration:
1. if you pass "value" in the config, then that value is just displayed in a nicely-formatted way.
2. if you pass "class" in the config, then an entry widget is displayed for the user to enter that class.
3. if you pass "object" and "property", then an entry widget is displayed for the user to enter object.property (with the class of that property, and the initial value of its current value)
So, the "right" way to do this, given the code you've already written, is:
1. change the command.birthWeight property to be a Double
2. in newbornsetRows, remove that config--it won't do anything
3. write a java.lang.Double.gsp under webapp/fragments/field, patterned after java.lang.Integer.gsp that's there already.
You could probably do this more easily though if you just put something like <input name="birthWeight" type="number" min="0" max="10" step="0.1" value="${command.birthWeight ?: ""}"/>
-Darius