I have a GSP with a form for submitting a search that updates a div on the page via an Ajax call:
<g:submitToRemote value="Search"
update="employeeList"
url="[controller: 'employee', action: 'searchAjax']" />
My EmployeeController has the searchAjax action:
def searchAjax = {
def employees = employeeService.search(params.searchTerm)
render(template: 'employeeListing', collection: employees, var: 'employee')
}
Unfortunately the rendered output always includes my controller's layout. Is there a way to have the render() method only render the template without the layout?