オブジェクトのリストを取得するコントローラーがあります
def historyInstance = History.findAllByPatient(patientInstance)
def total = historyInstance.size()
[historyInstanceTotal: total,historyInstanceList: historyInstance]
私は historyController にはいませんが、ページごとに最大 3 つのオブジェクトのビューでこれをページ分割したいと考えています
<g:paginate total="${historyInstanceTotal}" />
しかし、パラメータが必要なように見えましたが、結果が間違っているため使用できません。どうすればこの問題を解決できますか?
考え
たぶん、<g:paginate>
何をページネーションするべきかわからない、適切にページネーションするためにこれら 2 つ (<g:paginate>
と) をリンクするにはどうすればよいでしょうか。historyInstanceList
generate-all