1 person found this helpful
To answer your first question you can get node object of your current component instance from implicit resource object
Node node = currentResource.adaptTo(Node.class);
Now about travelling through various heirarchy in repository system you can travel any where. Just go throught these api which will give you better idea and understanding of most commonly used APIs in CQ.
Also referhttp://dev.day.com/docs/en/cq/current/howto/taglib.html which will give information about implicit objects available.
Well, it turns out my original idea of using the currentNode object actually works. The problem I was running into is that component E doesn't generate a node in the CRX until it is edited, which is why it returned null.
True and that is defaul behavior. So traveling in node heirarchy you can do using any of these apis until desired node exist in system.