I am trying to pass from my controller to my view in grails
In my controller i have this:
def index() {
def user = User.get(springSecurityService.principal.id)
def children = user.children
}
and in my gsp (view i have this)
<g:each var="child" in="${children}">
<p>Name: ${child.firstname}</p>
<p>Author: ${child.lastname}</p>
</g:each>
It does not pick up the children object from my controller i have also tried
<% def children = children %>
with no luck
can some one please point me in the right direction
Thanks
Try this: