I needed a way to limit the dataset based on filters set by my end-user.
Currently there does not seem to be a simple way to pass along data that is also picked up and send as POST data with the AJAX request.
As a workaround I figured I'd just to set the filters as a get/query parameter but querystring is not being passed to ajax neither.
Currently the ajax url is constructed as window.location.origin + window.location.pathname.
Adding + window.location.search adds the querystring which then can be picked up in the controller to do with as one wishes (ie. filter the result set).
I needed a way to limit the dataset based on filters set by my end-user.
Currently there does not seem to be a simple way to pass along data that is also picked up and send as POST data with the AJAX request.
As a workaround I figured I'd just to set the filters as a get/query parameter but querystring is not being passed to ajax neither. Currently the ajax url is constructed as
window.location.origin + window.location.pathname
.Adding
+ window.location.search
adds the querystring which then can be picked up in the controller to do with as one wishes (ie. filter the result set).