Deleting nodes in JCR via Author dialog
I need to create a component (say componentA) whose aim is to allow a user to add a variable number of components (choosing from componentB and componentC). So componentA is like a parsys which contains others components. |
I'm using a multifieldpanel to create a component's dialog with a user controlled number of field. Something like this:

The problem is when I try to eliminate one of the elements added directly from the dialog of componentA: the element is effectively eliminated from the dialog but it actually remains inside the CRX. My CRX is something like:
- componentA
- componentASon_0
- componentASon_1
My question is how can I do this in a proper way. Is there a java service needed for this or is there a direct way to delete and manipulate nodes in the JCR from a Dialog.
Thanks and regards!