I am making a script traversing page tree structure. For some reasons I switched from python to groovy which is new to me. So this problem could be connected with xwiki script support as well as groovy.
I have a one argument method
def includeDocWithChildren = {String documentRef ->
def doc = xwiki.getDocument(documentRef)
for(child in doc.getChildren()){
includeDocWithChildren(child)
}
}
Now I call it
includeDocWithChildren('Main.WebHome')
I get following error
groovy.lang.MissingMethodException: No signature of method: org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.includeDocWithChildren() is applicable for argument types: (String) values: [Main.WebHome]
When the string parameter is without dot (e.x. “Main-WebHome”), the method is found. Could you get me a hint what’s going on?
Edit 2020-05-22: Groovy script updated to contain the bad part. It would be nonsense without it.