0
이 코드의 잘못된 점은 모든 결과가 뷰로 돌아 오기 때문에로드가 너무 많이 걸리기 때문입니다. 페이지 당 5 개만 반환하고 싶습니다.Grails 페이지 매김 사용
컨트롤러 :
{
def channel2 = Channel2.list(params)
//def prog = Programmation.list()
def prog
def progs = [:]
def temp
channel2.each{
Programmation p = Programmation.withCriteria {
eq('prog_channel', it)
'between'('prog_start', new Date(), new Date() +1)
}
progs.put(it.id, p)
}
[channel: channel2, program: progs]
}
GSP
<g:render id="" template="/layouts/canais"/>
<g:paginate next="Forward" prev="Back"
maxsteps="0" max="3" controller="teste"
action="myProgramms_canais"
total="${tv_megazineplus.Channel2.count()}" />
나는 그것을 알아 두지. 나는 Grails helpPage를 따라 갔다.
어떤 도움이 필요합니까? 여전히 작동하지 않는다. – recoInrelax