I’m writing a custom widget that will be instantiated multiple times in a form.
How can I reference this specific instance elements in the controller function?
I tried generating random id´s, but it seems the template is not ready when the controller function is executed, so $(“#” + randomId) generates a JavaScript exception.
What are you trying to achieve? Normally the controller will have access only to the data manipulated by its template. So even though, we put multiple times the same widget on the a single page, the behavior of the widget should be affected.
By example, here you can find the source code of a fileUpload widget. You can did a test where you declare multiple times the fileUpload widget on a page, you will see that each widget manage its own file.
Bonitasoft empowers development teams with Bonita, the open-source and extensible platform to solve the most demanding process automation use cases. The Bonita platform accelerates delivery of complex applications with clear separation between capabilities for visual programming and for coding. Bonita integrates with existing solutions, orchestrates heterogeneous systems, and provides deep visibility into processes across the organization.