I’m developing a plugin for 3.4 which should display a listPanel with a button to open a modal with a form related to the list item. Before 3.4 one would use controllers for this (such as GridHandler and GridCellProvider). However, controllers are deprecated in 3.4 (https://docs.pkp.sfu.ca/dev/documentation/en/frontend-controllers).
I managed to display a listPanel using components from the UI library, but struggle with implementing a button for each item to open a modal window with a form (a rather widspread use case), as the existing modal UI element does not support parameters.
I tried to setup a custom modal which would take parameters, but I found no way to add custom js (or more specific: vue components) to backend pages.
Any ideas how to solve this problem?
Two ideas: (1) extend the modal UI so that it supports parameters which can then be passed to a form, or (2) allow developers to add custom js (or vue components) to backend pages.
Any help is appreciated : )
Yours
Felix
Hi Felix,
have you seen this example https://github.com/jardakotesovec/backend-ui-example-plugin
This hopefully could help you to set on the right path.
Main principle is basically to create your own vue.js component - that will give you lot of flexibility on the logic. And you can still leverage components from the ui-library.
Let me know if this helps.
kind regards
Jarda
1 Like
Hi @jardakotesovec Thanks a lot! No, I didn’t know about this! That is very much what I was looking for
I will check this out and come back to you if I need some help 
Yours
Felix
Hi Jarda @jardakotesovec,
thanks again for pointing out the example plugin. I managed to create a custom component that uses a pkp component. It works with the vite server, but when I add the script to the plugin, the component is not recognized (no error message either).
I use the current version of vue and vite, while your example utilizes vue2 - so that may be a reason. Should I also use vue2 here or do you plan to upgrade pkp’s UI library? Any ideas?
Yours,
Felix
Hi Felix,
indeed you will need to stick with vue2 for the 3.4 version. We have upgrade to vue3 for version 3.5.
There is intention to reuse one existing vue instance to avoid bundling another one and avoid any conflicts between them - backend-ui-example-plugin/vite.config.js at main · jardakotesovec/backend-ui-example-plugin · GitHub