私は2つのドメインを持っています:
class A {
String name
B b
}
class B {
String code
}
デフォルトの足場を使用します。A リスト ビューに移動すると、B インスタンスがないため、A インスタンスを作成できません。gspはこちら
<g:if test="${B?.list()}">
</g:if>
<g:else>
<g:link class="create" action="create" controller="b">
<g:message code="default.new.label" args="['b']" />
</g:link>
</g:else>
B の作成リンクをクリックすると、B インスタンスを作成できますが、作成中の A オブジェクトへの「接続」が失われます。このシナリオでユーザーをサポートする良い方法はありますか? アイデアは、モーダル ボックスで create B リンクを開くことでしょうか?