I need a solution to a problem in adobe day cq.
My problem is : i need to add a node through program...
I used the following code:
here newNode is a node.
i also tried
Please help me..
Regards and Thanks,
Heidi, Have a look at the JcrUtil API's createUniqueNode method:
http://dev.day.com/docs/en/cq/current/javadoc/com/day/cq/commons/jcr/JcrUtil.html#createUn iqueNode(javax.jcr.Node, java.lang.String, java.lang.String, javax.jcr.Session)
Parameters: parent - existing parent node for the new node
nodeNameHint - name hint for the new node
nodeType - to use for creation of the node
session - to use
Returns: the newly created Node
Throws: RepositoryException - in case of exception accessing the Repository
Thank you Mr.Boucher.....
I was working on it and i found that the session needed to be saved...