Details as below :
1] The repository structure is as below
/fhfghf and so on.
/dfgoe and so on.
/sddgg and so on.
2] I need to retrieve nodes at the level , where[First,Second, Third] are present and return these in a drop down on the page.
3] Trying to make use of a servlet here.
Any thoughts/pointers on this will be helpful.
Solved! Go to Solution.
In simple terms form JSON data in servlet and return it to your widget
here are article showing this:
I tried using the below :
Resource resource = request.getResourceResolver().getResource("/etc/x/y/");
Node node = resource.adaptTo(Node.class);
NodeIterator nodeIterator = node.getNodes();
1] Looks like node.getNodes() is getting me the entire nodes udner /etc and not just nodes at level where "First", "Second", "Third".
2] "node" is getting me "/etc/x/y/"
3] Any thoughts on how to get nodes at this level , will be helpful.
Sorry, probably I was not very clear.
1] I mean looks like it is reading all nodes under /etc/x/y/ and not just "FIrst","Second","Third" which are direct children of /etc/x/y.