New issue 14 by andrusk...@hot.ee: Type conversion not consistent with
grails controllers
http://code.google.com/p/jquery-validation-ui-plugin/issues/detail?id=14
in latest version of JQueryRemoteValidatorController propertyValue is
calculated using DefaultGroovyMethods.toTypeClassName(value) method. This
is not consistent with suggested way of type conversion in controller:
either bindData() or instance.properties = params
This causes us problems with dates in custom format because
DefaultGroovyMethods does not have toDate method and if it will have one,
it will not support spring custom property editors.
I'm suggesting to use bindData(validatableInstance, params, [include:
[params.property]]), getting value from validatableInstance, discarding
changes in validatableInstance afterwards (if validatableInstance was read
from database?) and maybe copy errors for given field/property from
validatableInstance if type conversion error occurs?
Comment #1 on issue 14 by limchee...@vobject.com: Type conversion not
consistent with grails controllers
http://code.google.com/p/jquery-validation-ui-plugin/issues/detail?id=14
Thanks for report this issue.
I not sure I am understood the issue. Anyway, can you update
JQueryRemoteValidatorController.groovy to include the solution you
suggested. I am happy to incorporate the updated code to the plugin as long
as it doesn't break application of other plugin users.
Attached patch. Discarding instance after validation should guard against
possible side-effects. Please review as my grails knowledge is quite small.
Attachments:
TypeConversion.patch 944 bytes
Thanks, I will look into it.
Is there any progress on this? Any idea when this will be included in a
release? It doesn't seem to be.
Comment #5 on issue 14 by limchee...@vobject.com: Type conversion not
consistent with grails controllers
http://code.google.com/p/jquery-validation-ui-plugin/issues/detail?id=14
To be released in 1.2.4