List in gsp

classic Classic list List threaded Threaded
1 message Options
js
Reply | Threaded
Open this post in threaded view
|

List in gsp

js
Hello , I need a help . I want to show list in gsp table . The list is as follows 

student = [[students.StdAsgn : 1, students.StdAsgn : 2, students.StdAsgn : 3], [students.StdAsgn : 4, students.StdAsgn : 5, students.StdAsgn : 6]]

which is send to the template as render(template:'studentList' ,model: [std:students])'
and got the list in table using g:each as 
<g:each var="s" in="${std}">
    <tr>
<td>${s[0].student.stdName}</td>
<td>${s[0].student.stdEmail}</td>
<td>${s[0].student.phNum}</td>
<td>${s.assignment.aName}</td>
<td>${s.student}</td>
<td>${s.status}</td>
</tr>
</g:each>

and the table shown in is as follows :
Showing 1 to 2 of 2 entries

 

but i want to get table in the following ways.
NameEmailPhone NoAssignment NameURLAction
Sagar Budhathoki[hidden email]1234567890C Programming Assignment, 
Assignment 1
 asgn 3
students.Student : 1
students.Student : 1
students.Student : 1
false
 false 
false
Kabita Oli[hidden email]987654321C Programming Assignment
Assignment 1
asgn 3
students.Student : 2
students.Student : 2
students.Student : 2
false
 false
 false

 How to divide one into multiple rows using grails  


--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/d9a88447-b9f9-4b2a-85cb-07d5a6ef6b52%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.