문제

Is it possible to use only one controller for several domain model classes if all those classes are in the same hierarchy (ie: they all inherit from the same base class)? So for example, can I create a FormController as my controller and have the following domain models be serviced by it:

Form
BigForm (inherits from Form)
SmallForm (inherits from Form)
OtherForm (inherits from Form)

If this is possible, how do I tell Grails to create the correct domain model object when entering some of the default methods like save, update, delete, etc.? Or in other words how do I make data binding work correctly with this setup?

올바른 솔루션이 없습니다

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top