Announcement Announcement Module
Collapse
No announcement yet.
Accessing CommandClasses Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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 url parameters directly:
    class MyController {
    def list = { ListCommand cmd ->
    // 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!!

  • #2
    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.

    Comment

    Working...
    X