2
我有一個GSP與提交一個通過Ajax調用更新頁面上的一個div搜索的形式:渲染模板在Grails中總是輸出佈局(我不希望它!)
<g:submitToRemote value="Search"
update="employeeList"
url="[controller: 'employee', action: 'searchAjax']" />
我EmployeeController有searchAjax行動:
def searchAjax = {
def employees = employeeService.search(params.searchTerm)
render(template: 'employeeListing', collection: employees, var: 'employee')
}
不幸的是渲染輸出始終包括我的控制器的佈局。有沒有辦法讓渲染()方法只有呈現沒有佈局的模板?