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:
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!
Solved! Go to Solution.
Views
Replies
Total Likes
To delete Nodes, you use the JCR AP, which is Java. You need a session with permission too that is able to delete that node. This is typically not handled at the dialog level.
Hiwever, one way i can see is creating a custom xtype. I see you are working in classic ui. From the JS, pass a request to a Servlet where you can use Java JCR API to delete a node,
Views
Replies
Total Likes
I would recommend you to see Template editor. This will is the recommended way of restricting the components to the page via policy configurations.
Whereas you can have a look at this article covering JCR API to do CURD operations on the JCR :- Adobe Experience Manager Help | Programmatically Accessing Adobe Experience Manager Content using th...
// JCR API:- Apache Jackrabbit - JCR API
-Kautuk
Views
Replies
Total Likes
Hi, does this mean its not possible to do it directly via the dialog? AEM build-in functionality?
What I need is a function behind the deletion button (the red minus) that deletes the node with the according name from the multifield as shown in the picture above.
Views
Replies
Total Likes
OOTB there is no component to do this. Where as you can create a custom component where dialog can select the node to be deleted and backed logic can delete that node.
Directly we can do it from CRX/de.
-Kautuk
Views
Replies
Total Likes
To delete Nodes, you use the JCR AP, which is Java. You need a session with permission too that is able to delete that node. This is typically not handled at the dialog level.
Hiwever, one way i can see is creating a custom xtype. I see you are working in classic ui. From the JS, pass a request to a Servlet where you can use Java JCR API to delete a node,
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies