creating editable table #1011
-
Hi, I'm currently researching GLSP and I'm looking for a possibility to add an editable table in my diagram. I would like to add data to this table if needed. When the data is added and I save the file, I need to be able to find this data back in the JSON. Any ideas how I can accomplish this? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
In Open-BPMN we have done this by using JSONForms which integrates nicely into GLSP. By implementing a GLSP UI-Extension we integrated a property panel which shows complex input forms also with tables: |
Beta Was this translation helpful? Give feedback.
-
Forms and table components are always a bit difficult to develop from scratch as there are often many hidden features that one expects. However, in general, from a GLSP point of view you have two options:
Depending on your use case, my recommendation would be to re-use an existing framework and simply fill it with data that comes from GLSP. Using a UI extension you can inject all necessary GLSP services, e.g., the editor context, the selection service, the action dispatcher etc. In our workflow example, we use a UI extension to render an auto-completion widget when editing a task label and submit the new data using a dedicated action, see TaskEditor. I hope that gets gets you properly started. |
Beta Was this translation helpful? Give feedback.
In Open-BPMN we have done this by using JSONForms which integrates nicely into GLSP.
By implementing a GLSP UI-Extension we integrated a property panel which shows complex input forms also with tables: