compassinformatics / cpsi-mapview

GNU General Public License v3.0
6 stars 14 forks source link

Allow custom parameters to be passed to a DELETE service #682

Closed geographika closed 5 months ago

geographika commented 5 months ago

A new placeholder function has been added that can be overridden in a subclass to allow parameters to be passed to a DELETE service via the querystring.

For example, in a controller that inherits from CpsiMapview.form.ControllerMixin getDeleteParameters can be added to return an object of key value pairs:

    getDeleteParameters: function () {
        var me = this;
        var myCustomParam= me.getViewModel().get('myCustomParam');
        return {
            myCustomParam: myCustomParam
        };
    }

The DELETE calls with then include a querystring e.g. /object/12432?myCustomParam=abc

This should have no effect on any existing code or classes.