Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.0.2, 2.0.3, 2.0.4
-
Component/s: Data binding
-
Labels:
-
Environment:Windows 7 64-bit
Description
Posting from g:uploadForm (enctype="multipart/form-data" makes the difference) a Date value binding to a domain subclass reports:
Field error in object 'dtest.BigEvent' on field 'startDate': rejected value [null]; codes [typeMismatch.dtest.BigEvent.startDate,typeMismatch.startDate,typeMismatch.java.util.Date,typeMismatch]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [dtest.BigEvent.startDate,startDate]; arguments []; default message [startDate]]; default message [Failed to convert property value of type 'java.lang.String' to required type 'java.util.Date' for property 'startDate'; nested exception is java.lang.IllegalArgumentException: Could not parse date: Unparseable date: "date.struct"]
1. BigEvent extends Event
2. g:uploadForm must be used instead of g:form
I am uploading simple app that will show the error.
-
Hide
- DTest.zip
- 04/Jun/12 4:44 PM
- 406 kB
- Oleg Tim
-
- DTest/.classpath 0.7 kB
- DTest/.project 0.5 kB
- DTest/.../org.codehaus.groovy.eclipse.preferences.prefs 0.1 kB
- DTest/application.properties 0.1 kB
- DTest/.../ApplicationResources.groovy 0.1 kB
- DTest/grails-app/conf/BootStrap.groovy 0.1 kB
- DTest/grails-app/conf/BuildConfig.groovy 2 kB
- DTest/grails-app/conf/Config.groovy 4 kB
- DTest/grails-app/conf/DataSource.groovy 1 kB
- DTest/grails-app/.../spring/resources.groovy 0.0 kB
- DTest/grails-app/conf/UrlMappings.groovy 0.2 kB
- DTest/.../BigEventController.groovy 4 kB
- DTest/grails-app/.../dtest/BigEvent.groovy 0.1 kB
- DTest/grails-app/.../dtest/Event.groovy 0.1 kB
- DTest/grails-app/.../messages.properties 3 kB
- DTest/.../messages_cs_CZ.properties 3 kB
- DTest/grails-app/.../messages_da.properties 3 kB
- DTest/grails-app/.../messages_de.properties 4 kB
- DTest/grails-app/.../messages_es.properties 3 kB
- DTest/grails-app/.../messages_fr.properties 2 kB
- DTest/grails-app/.../messages_it.properties 2 kB
- DTest/grails-app/.../messages_ja.properties 4 kB
- DTest/grails-app/.../messages_nl.properties 3 kB
- DTest/.../messages_pt_BR.properties 3 kB
- DTest/.../messages_pt_PT.properties 3 kB
- DTest/grails-app/.../messages_ru.properties 4 kB
- DTest/grails-app/.../messages_sv.properties 3 kB
- DTest/grails-app/.../messages_th.properties 6 kB
- DTest/.../messages_zh_CN.properties 2 kB
- DTest/grails-app/.../bigEvent/create.gsp 2 kB
Issue Links
- is related to
-
GRAILS-9178
Relationship data binding fails for extended classes
-
-
GRAILS-8998
Custom structured property editor data binding support broken after upgrade from 2.0.1 to 2.0.2 / 2.0.3
-
Activity
- All
- Comments
- Work Log
- History
- Activity
- Git Commits
This isn't really the same problem as GRAILS-8998 but the 2 were fixed at the same time. When testing the fix for GRAILS-8998 I realized the inheritance problem as it relates to structured editors and fixed it. That fix covers the issue described here as well.
Sorry for the trouble.
Oleg,
No problem. If you care to help verify the change you can grab the latest 2.0.5 snapshot at http://hudson.grails.org/view/Grails%202.0.x/job/grails_core_2.0.x/lastSuccessfulBuild/artifact/build/distributions/. If you do, please report back here.
Thanks for reporting the issue.
Is there more information I can provide to get anyone to look into this issue?