Even better, below this line we can do:

|noDataCallback = ConfirmDialog.hide;|

that will be used in the first two branches of the switch, and overwritten in the default case.