你如何<g:include>
在javascript中使用?因为每当我的模态显示使用它时我都想要它<g:include id="${t.id}" controller="superAdmin" action="showTable"/>
$("#show_${t.id}").on('show.bs.modal', function () {
});
更新
基本上<g:include id="${t.id}" controller="superAdmin" action="showTable"/>
会在模态显示后显示
<ol class="property-list">
<g:if test="${t?.tableNumber}">
<li class="fieldcontain" style="margin-left:6px;">
<span id="tableNumber-label" class="property-label"><g:message code="table.tableNumber.label" default="Table Number " /></span>
<span class="property-value" aria-labelledby="tableNumber-label"><g:fieldValue bean="${t}" field="tableNumber"/></span>
</li>
</g:if>
<g:if test="${t?.numberOfChairs}">
<li class="fieldcontain">
<span id="numberOfChairs-label" class="property-label"><g:message code="table.numberOfChairs.label" default="Number Of Chairs" /></span>
<span class="property-value" aria-labelledby="numberOfChairs-label"><g:fieldValue bean="${t}" field="numberOfChairs"/></span>
</li>
</g:if>
<g:if test="${t?.mergedWith}">
<li class="fieldcontain">
<span id="mergedWith-label" class="property-label"><g:message code="table.mergedWith.label" default="Merged With" /></span>
<span class="property-value" aria-labelledby="mergedWith-label"><g:fieldValue bean="${t}" field="mergedWith"/></span>
</li>
</g:if>
<g:if test="${t?.status}">
<li class="fieldcontain">
<span id="status-label" class="property-label"><g:message code="table.status.label" default="Status" /></span>
<span class="property-value" aria-labelledby="status-label"><g:fieldValue bean="${t}" field="status"/></span>
</li>
</g:if>
<g:if test="${t?.orderSlip}">
<li class="fieldcontain">
<span id="orderSlip-label" class="property-label"><g:message code="table.orderSlip.label" default="Order Slip" /></span>
<g:each in="${t.orderSlip}" var="o">
<span class="property-value" aria-labelledby="orderSlip-label">${o?.encodeAsHTML()}</span>
</g:each>
</li>
</g:if>
</ol>
<g:form>
<g:hiddenField name="id" value="${t.id}" />
<button type="submit" class="btn btn-primary pull-right" name="_action_deleteTable" value="deleteTable">
<span class="glyphicon glyphicon-floppy-remove"></span> Delete
</button>
<g:remoteLink id="${t.id}" controller="superAdmin" action="editTable" update="tableShown_${t.id}">
<button type="submit" class="btn btn-primary pull-right" style="margin-right:5px;">
<span class="glyphicon glyphicon-floppy-remove"></span> Edit
</button>
</g:remoteLink>
<div style="clear:both"></div>
</g:form>
这是我的另一个问题Grails: how to re initialize AJAX content in twitter bootstrap 3 modal的链接。它与此有关,因为我不知道该问题的正确解决方法。有一个关于模态应该显示什么的解释