I found that the grails documentation indicates the built-in class definitions, either the same source file as the domain class, or is placed in src / groovy. I put Address.groovy in src / groovy and created a user interface for my Family class that has an inline object. The generated creation page now displays correctly, and the address fields are included in the Family page. However, I still had to change the name and value fields of each form field in the generated _form.gsp.
For example, the following generated code ...
<g:textField name="line1" required="" value="${addressInstance?.line1}"/>
has been changed to ...
<g:textField name="address.line1" required="" value="${familyRegistrationInstance.address?.line1}"/>
If the main domain object is the FamilyRegistration domain class (specified in the generated _form.jsp as familyRegistrationInstance), which has a built-in Address object. I am using grails 2.3.11.
The save operation now works with correctly filled fields of the embedded object. In my case, this means that FamilyRegistration.address is populated correctly.
Here is the relevant information from the Grails reference document ...
"The built-in component class is usually declared in the same source file as the owner class or in its own file in src / groovy. You can place the component class under grails-app / domain, but if you do this, the Grails will automatically create a dedicated table for it Putting a class under src / groovy is usually the best option because you can share the component for multiple domain classes.
http://grails.org/doc/2.2.4/ref/Domain%20Classes/embedded.html
source share