Issue 14 in jquery-validation-ui-plugin: Type conversion not consistent with grails controllers

10 views
Skip to first unread message

jquery-valida...@googlecode.com

unread,
May 31, 2011, 12:17:05 PM5/31/11
to jquery-valida...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

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?


jquery-valida...@googlecode.com

unread,
Jun 1, 2011, 12:10:08 AM6/1/11
to jquery-valida...@googlegroups.com
Updates:
Status: Accepted

Comment #1 on issue 14 by limchee...@vobject.com: Type conversion not

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.

jquery-valida...@googlecode.com

unread,
Jun 5, 2011, 2:39:27 PM6/5/11
to jquery-valida...@googlegroups.com

Comment #2 on issue 14 by andrusk...@hot.ee: Type conversion not consistent

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

jquery-valida...@googlecode.com

unread,
Jun 5, 2011, 10:18:41 PM6/5/11
to jquery-valida...@googlegroups.com

Comment #3 on issue 14 by limchee...@vobject.com: Type conversion not

Thanks, I will look into it.

jquery-valida...@googlecode.com

unread,
Dec 31, 2011, 11:21:10 AM12/31/11
to jquery-valida...@googlegroups.com

Comment #4 on issue 14 by bksavi...@gmail.com: Type conversion not

Is there any progress on this? Any idea when this will be included in a
release? It doesn't seem to be.

jquery-valida...@googlecode.com

unread,
Jan 15, 2012, 1:36:10 AM1/15/12
to jquery-valida...@googlegroups.com
Updates:
Status: Fixed

Comment #5 on issue 14 by limchee...@vobject.com: Type conversion not

To be released in 1.2.4

Reply all
Reply to author
Forward
0 new messages