-
Nov 30th, 2009, 02:19 PM
#1
Enum and Web error
Hi all,
I am just a newbie on Roo and meet an issue when using enum.
With the script below:
persistence setup --provider HIBERNATE --database HYPERSONIC_PERSISTENT
enum type --name ~.core.EStatus
enum constant --name ACTIVATED
enum constant --name DESACTIVATED
entity --name ~.core.Project
field string --fieldName projectId --notNull --sizeMax 15 --sizeMin 3
field enum status --class ~.core.Project --type ~.core.EStatus --enumType STRING
controller scaffold ~.web.ProjectController
When I try to use the web form to create my object Project, I've got the following error when clicking on the save button:
Failed to convert property value of type java.lang.String[] to required type xxx.core.EStatus for property status; nested exception is java.lang.IllegalStateException: Cannot convert value of type [java.lang.String[]] to required type [xxx.core.EStatus] for property status: no matching editors or conversion strategy found
Any idea what I am doing wrong?
I'm using ROO 1.0.0-RC3.
Thanks in advance.
-
Nov 30th, 2009, 07:24 PM
#2
There were a number of changes and bug fixes related to type conversion and enums recently which cause this issue. I just tested your script against the current Roo trunk and it works there. We are planning to release Roo RC4 very soon which will rely on a new Spring 3 release candidate and therefore work with your enums.
HTH,
Stefan
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules