Using a grails/groovy class by reference -
I am trying to make my CRDoDr Controller so that Garras can not be made for goods.
Instead of maintaining the code for the controller for each domain, I want to have a controller who can take care of any domain for the normal CRUD call. Because the difference is only the domain class name is.
Domain Class Job & Examples; Note
Job.get (id) Job.list () def Example = New Job (Parameters) Note. Gate (ID) Note. Def frequency = new job (parameter) I was thinking def someHandler = Job // some handlers. () DEP frequency = new handler (parameter)
The first two static methods work fine (get, list) but not to create a new instance
Call by default.
def example = someHandler.newInstance ()
Creator for parameters using
def example = SomeHandler.newInstance (parameter)
Comments
Post a Comment