Solved! Go to Solution.
Views
Replies
Total Likes
Hello @sean12341 ,
You can involve a POST request to a servlet and in that servlet, you can set the custom property to the node in this manner,
Session session = request.getResourceResolver().adaptTo(Session.class);
Node itemNode = JcrUtil.createPath("your-targeted-path", JcrConstants.NT_UNSTRUCTURED, session);
itemNode.setProperty("propertyName", "propertyValue");
You can also achieve it using a Sling Model.
Thanks
Hello @sean12341 ,
You can involve a POST request to a servlet and in that servlet, you can set the custom property to the node in this manner,
Session session = request.getResourceResolver().adaptTo(Session.class);
Node itemNode = JcrUtil.createPath("your-targeted-path", JcrConstants.NT_UNSTRUCTURED, session);
itemNode.setProperty("propertyName", "propertyValue");
You can also achieve it using a Sling Model.
Thanks
Check article here -https://www.linkedin.com/pulse/aem-automatically-set-properties-nestor-de-dios
Hopes help you with updating textual content on text component.
Thanks,
Yes, you can use JavaScript Use-API, but it isn't easy to debug code, and it's server-side script.
Instead, use Java API for add/update property in AEM.
Hi @sean12341 ,
Could you please share the use case?
It is possible to some extend but it is rather a complicated process.
Other option would be add all sort of attributes in the dialog, hide them initially and make it available for the component using js based on the use case.