i have a Media Domain
def Media {
String name
static belongsTo = [parent:Media]
static hasMany = [children:Media]
}
In the show.gsp page i want to list all my root Media (that haven’t parent) into an ul list an their children and their children recursively in another ul lists. I have used the Tag for the first list but i don’t know how to do this recursively for the children.
So have you an idea of how to do this ?
Thanks.
You could put the recursive part into a GSP-template and then call it recursively, e.g.:
index.gsp: AssumingrootMediasis passed into the view_step.gsp