I’m developing a custom mass action that, before to be performed on selected records, it must show a dialog window to user with a custom form that I defined as a Type. As the user compiles the form and submits it, the mass action can be performed on selected records. In my case, the mass action consists in the creation of a batch job.
My question is about which is the best method to follow between:
1) to perform the logic of the mass action directly in the controller of the window dialog, by receiving the post with the form’s data and by creating the job. In this case I need a way to get in the dialog controller the records that the user has selected in the datagrid: in case the user have selected “all”, i need the querybuilder coming from the datagrid.
2) to receive data in the dialog controller as in the case (1), but passing the data to a specific handler implementing the MassActionHandlerInterface, like it happens in the AjaxMassAction. I see that in this case I’m able to give the querybuilder, but I don’t know how to invoke that handler from the submit button of the dialog and pass form’s data to it.
Any help will be appreciated!
You must be logged in to reply to this topic.