I have the following combo box:
<g:select name="ticketType" from="${app.domain.enums.TicketType?.values()}" keys="${app.domain.enums.TicketType.values() }" value="${ticketInstance?.ticketType}" noSelection="${['null': 'Select One...']}" />
I set the following restriction for the type ticketType in the command object
ticketType nullable: true, blank:true
TicketType is a very simple enumeration:
public enum TicketType { QUESTION, SUPPORT, MAINTENANCE, NEW_FUNCTIONALITY, MALFUNCTION }
And every time I do not set any value for ticketType in my GSP, I get the following error:
Failed to convert property value of type 'java.lang.String' to required type 'com.coming.enums.TicketPriority'
As with g: select, sets the value to "null" (string).
What am I missing?
drago source share