I am trying to create a dynamic advanced search with
Search field for name of person
Checkbox to enable inactive person records
Dropdown for team
So when I select a company, I want to update my template results with all people in that team. If I select a team and click checkbox for inactive person records, I want to see all people who have been with that team in the past.
So current I have something like this:
<g:checkBox name="showInactives" value="${true}" onchange="${remoteFunction(action:'updateResults', update:'searchResultsDiv', params:__VALUE OF EACH AJAX COMPONENT___)}" />
So when I select the checkbox, I am passing the value for the checkbox, the current results in the search, and which team was selected (if one).
Is this possible? Or is there an easier way with Grails and the AJAX components?
Yes, you can do that. Just pass in a map of the params you want: