Implement recursion with an HTMLSnippet. Create a page as above with a data/template grid with the appropriate retrieve and set the snippet code to check for context not null and if so use mx.ui.openForm
to load the same page.
Rough cut:
this._rendered=typeof(this._rendered)=='undefined'?false:this._rendered;
if(this.contextObj!=null&&!this._rendered){
this._rendered=true;
mx.ui.openForm("Anonymous/pop_comment.page.xml", {
location: "node",
domNode:this.domNode,
context:this.mxcontext,
callback: function(form) {
console.log(form.id);
}
});
}else{
}
Setup:
Alternatively create a widget.
Write a recursive function using mx.data.get
to retrieve recursively via xpath
or path
. Whilst recursing, create dom nodes and while doing so use mx.ui.openForm
to place it in these nodes with domNode
set to the widget’s domnode, context
set to the associated object
To my knowledge, it is not possible to make a recursive path in pages.
I'm trying to tackle this same problem myself, and I'm trying to accomplish this by using (one of) the following add-on widgets:
https://appstore.home.mendix.com/link/app/294/Mendix/TreeView-and-GridView
https://appstore.home.mendix.com/link/app/112707/Mendix/Tree-View
Perhaps one of these widgets might also help you?