Quantcast
Channel: Adobe Community : Unanswered Discussions - Digital Marketing Suite
Viewing all articles
Browse latest Browse all 937

How to set cq:tags property of the code through JCR 2.0

$
0
0

Hi,

I am trying to set the value of cq:tags programtically through JCR 2.0. When I execute this code

     Session session = repository.login( new SimpleCredentials("admin", "admin".toCharArray()));

                              Node n12 = session.getNode("/content/testprop_content");

                              session.getWorkspace().getVersionManager().checkout("/ content/testprop_content");

                              Node n1 = session.getNode("/content/testprop_content/jcr:content");

                              System.out.println("Node n1:"+n1.getName());

                                        n1.addMixin("cq:Taggable");

                                        n1.setProperty("cq:tags", arr);

                                        n1.setProperty("jcr:title","My custom title" );

 

the value of property jcr:title is set, but cq:tags it is coimg blank , where arr is an array containing 3 values. Am I doing something wrong.

 

Please let me know how to set the value of property cq:tags through code using jcr 2.0 or jackrabbit apis.

 

 

Thanks


Viewing all articles
Browse latest Browse all 937

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>