Are command objects really readonly?

View: New views
1 Messages — Rating Filter:   Alert me  

Are command objects really readonly?

by Fred Janon :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I get the following error when doing this in my service:

cmdinstance.properties = params

where cmdinstance is of type
EventCommand

Error:
Cannot set readonly property: properties for class: EventCommand

groovy.lang.ReadOnlyPropertyException: Cannot set readonly property: properties for class: EventCommand
at EventCommand.setProperty(EventCommand.groovy)

It seems weird but I use generic controllers and services, some use a domain class, some use a command object.

Thanks

Fred