I've got a pretty basic snippet of code that gets the currentNode of an object and looks through to get it's child nodes. Except for some reason this isn't working and I can't figure out why. getChildNodes()
is suppose to return an iterable list of children but all I'm getting is a: "Cannot loop with element of type node with collection of type Iterable
Node currentNode = resource.adaptTo(Node.class)
for (Node n : JcrUtils.getChildNodes(currentNode)){
//do something
}
Any ideas? Thanks for the help.