CQ.HTTP.post("/content/corp/en_us/test/jcr:content", null, {
"jcr:primaryType" : "cq:PageContent",
"propertykey" : "propertyvalue"
});
How can I give property type to it ?
Solved! Go to Solution.
Views
Replies
Total Likes
If you want to provide type information, you can check the documentation at [1].
CQ.HTTP.post("/content/corp/en_us/test/jcr:content", null, { "jcr:primaryType" : "cq:PageContent", "propertykey" : "propertyvalue", "isboolean@Boolean" : "true" });
Views
Replies
Total Likes
If you want to provide type information, you can check the documentation at [1].
CQ.HTTP.post("/content/corp/en_us/test/jcr:content", null, { "jcr:primaryType" : "cq:PageContent", "propertykey" : "propertyvalue", "isboolean@Boolean" : "true" });
Views
Replies
Total Likes
Hi Jörg Hoh , CQ.HTTP.post("/content/corp/en_us/test/jcr:content", null, {
"jcr:primaryType" : "cq:PageContent",
"propertykey" : "propertyvalue",
"isboolean@Boolean" : "true"
});
"isboolean@Boolean" : "true" This got updated as new property, Instead of the type of "propertykey"
So please suggest how can we give the type to a property ?
Views
Replies
Total Likes
What is your use case - looks like you are trying to post values to an AEM Servlet. That is a valid use case. However, in the Sling Servlet - use the JCR API to add props to a node. See this article on how to use the JCR API from within an OSGi bundle.
In this use case - we are adding props to a Customer node.
https://helpx.adobe.com/experience-manager/using/persisting-cq-data-java-content1.html
You have much more control over writing a Sling Servlet if your use case is to use a Servlet to update the JCR.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies