Back Forum Reply New

Accessing CommandClasses

There's a way to access all controllers and domain classes via
grailsApplication.domainClasses
grailsApplication.controllerClasses

Now, there's a nice feature to work with Command Objects instead of ucl parameters directly:
class MyController { def list = { ListCommand cmd -gt;   // do something }
}

class ListCommand { String blabla static constraints = { blabla(email: true, blank: false) }
}

that way, I can validate input parameters a little bit...

Now, I already do some metaClass magic and add some methods that do some error handling and a few other things and I add them to my domainClasses... but it seems there is no way to access all these commandClasses, or is there?

would be very cool if this is possible

Thanks!!

No, this isn't possible. I thought I raised an issue a long time ago to have command objects promoted to 'artifact' status, but I can't find it. If you do see it, feel free to vote.
¥
Back Forum Reply New