Hi,
I have a component and I would like to read and write some component properties. I was using "CQ.HTTP.post" in 5.61.
I'm wondering what is the best approach to do this.
Thanks
Views
Replies
Total Likes
Assume that i have a component here:
/apps/touchui-sightly-image-multifield/sample-image-multifield
As shown here:
and i want to get properties of component sample-image-multifield such as sling:resourceSuperType.
You can use QUeryBuilder API - see:
https://docs.adobe.com/docs/en/aem/6-1/develop/search/querybuilder-api.html
Views
Replies
Total Likes
I believe you replied to wrong topic.
Views
Replies
Total Likes
Hi,
In general all properties/values will be stored in nodes as you will be aware
In order to access those properties/values we make ajax call, now you can either make those calls via method defined in jQuery library or you can use method defined in ExtJS framework.
Internally they will be making same calls to node for read and write.
and If you are making use of methods defined in ExtJS, I guess it should be fine.
This was based on my understanding....
Thanks
Praveen
Views
Replies
Total Likes
Praveen, can provide a code sample?
There is no ExtJS in Touch UI, FYI.
Views
Replies
Total Likes
Yup...agreed there is not ext js in touch ui,
in that case use something like
$.getJSON("/libs/wcm/core/resources/languages.2.json").done(function(data){ console.log(data); });
There is very good use for this, it was released today
http://adobeaemclub.com/touch-ui-dynamic-selection-of-multiple-drop-downs-in-aem-6-1/
Views
Replies
Total Likes
Hi Bulent,
I think you can definitely use CQ.HTTP.Post to create a read and write component.
but in my opinion any operations should be done in the backend services while you can call that service from your frontend using JQuery
Regards,
Lokesh
Views
Replies
Total Likes
I 100% agree - its best practice with AEM to have a backend service read the JCR - not front end JS logic. Use front end JS logic to invoke a backend service and display the result set.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies