私は Grails の初心者で、Ajax を試しています。remoteField について調べたすべての例で、結果は画面上の単純な div 領域にレンダリングされます。これは機能していますが、コントローラーからの結果で gsp フィールドの 1 つの値を更新したいと考えています。以下に示すように設定すると、フィールド要素が消えてプレーンテキストだけに置き換えられます。代わりに特定のフィールドを識別する方法はありますか?
<div id="thisOne" class="fieldcontain ${hasErrors(bean: orderItemInstance, field: 'total', 'error')} required">
<label for="total">
<g:message code="orderItem.total.label" default="Total" />
<span class="required-indicator">*</span>
</label>
<g:field name="total" value="${fieldValue(bean: orderItemInstance, field: 'total')}" required=""/>
</div>
<div id="input" class="fieldcontain">
<label for="input">
Input field
</label>
<g:remoteField name="input" action="recalc" update="thisOne"/>
</div>