我有一个名为Student的域类。它包含一些变量,例如student_name,student_address,student_class。实际上我想按student_class的顺序显示学生详细信息。
我有一个名为 list.gsp 的 GSP 页面。 列表.gsp:
<g:each in="${std}" status="v" var="stdInstance"> //All Class eg:1..10.
<h3>${stdInstance.std_class}</h3>
//Innerloop
//here i want to display students details depending on the value of stdInstance.std_class.
</g:each>
我想知道如何通过内部 g:each 调用控制器动作并传递参数。