Diese Konversation wurde aufgrund von Inaktivität geschlossen. Bitte erstellen Sie einen neuen Post.
Level 1
Level 2
Melden Sie sich an, um alle Badges zu sehen
Diese Konversation wurde aufgrund von Inaktivität geschlossen. Bitte erstellen Sie einen neuen Post.
I have some nodes under /etc on my repository which I'd like to insert or change the values of some properties in it. But I neither want to affect nor know the value of other properties in the very same node.
What is the best way to do this task?
I was able to create a new sub-node by uploading a package and installing it using the Package Manager, but is not quite what I need.
Can anyone shed some light?
Thank you very much.
Gelöst! Gehe zu Lösung.
Here is sample one
Node n = session.getNode("/content/project/home"); n.setProperty("Name","AEM"); Node n = session.getNode("/content/project/home"); String s = n.getProperty("Name").getString();
For adding you can directly call setProperty method, if that property exist it will be updated else a new one will be added.
Zugriffe
Antworten
Likes gesamt
Example article is here: http://helpx.adobe.com/adobe-cq/using/programmatically-accessing-cq-content-using.html.
Zugriffe
Antworten
Likes gesamt
To change the properties of a JCR node, use the JCR API. You can write app logic to modify existing node's props.
Zugriffe
Antworten
Likes gesamt
Here is sample one
Node n = session.getNode("/content/project/home"); n.setProperty("Name","AEM"); Node n = session.getNode("/content/project/home"); String s = n.getProperty("Name").getString();
For adding you can directly call setProperty method, if that property exist it will be updated else a new one will be added.
Zugriffe
Antworten
Likes gesamt
Zugriffe
Likes
Antworten
Zugriffe
Likes
Antworten