ACS AEM common Generic list component provide us to list key/value pair on page. I have XML and flat files with tons of key/value pairs. Is there some way to directly populate all key/values from XML and text files to generic list.
Thanks,
Solved! Go to Solution.
Out of the box - there is no service. However - AEM is very powerful in that it lets you build custom services.
Create a custom AEM service that uses Java XML library to read XML:
http://www.mkyong.com/java/how-to-read-xml-file-in-java-dom-parser/
You can also build Java logic to read from text fiile:
http://stackoverflow.com/questions/4716503/best-way-to-read-a-text-file
You can build this Java logic into a custom AEM Service:
https://helpx.adobe.com/experience-manager/using/first-osgi.html
The above article shows you how to build an AEM custom service.
Views
Replies
Total Likes
Out of the box - there is no service. However - AEM is very powerful in that it lets you build custom services.
Create a custom AEM service that uses Java XML library to read XML:
http://www.mkyong.com/java/how-to-read-xml-file-in-java-dom-parser/
You can also build Java logic to read from text fiile:
http://stackoverflow.com/questions/4716503/best-way-to-read-a-text-file
You can build this Java logic into a custom AEM Service:
https://helpx.adobe.com/experience-manager/using/first-osgi.html
The above article shows you how to build an AEM custom service.
Views
Replies
Total Likes
Thanks Scott! Let me try it.
Views
Replies
Total Likes
Is there any example to add new child node through sling API calls?
I am able to manage below code snippets through some research but somehow it doesn't work
String file = "/etc/acs-commons/lists/test/jcr:content/list";
Resource pageResource = rr.getResource(file);
Map<String,Object> prop = new HashMap<>();
prop.put("jcr:title","test");
prop.put("value","testvalue");
Resource newr = rr.create(pageResource,"item3",prop);
Thanks,
Views
Replies
Total Likes
Never mind, I got it working now.
I didnt close and commit resource resolver - that did trick.
Good job!!
Views
Replies
Total Likes