我有一個搜索網頁,用戶可以通過一個人的種族篩選搜索結果,作爲複選框組。有12個「種族」複選框。該PARAMS獲得通過到G:分頁爲以下,從而使用戶可以通過搜索結果頁面,並保留什麼的種族複選框選中:擺脫在Grails分頁中的不需要的參數
<g:paginate controller="search" action="list" total="${resultCount}" params="${params}"/>
什麼獲取輸出的鏈接,其中包含了一堆不必要的數據每個內置網址:
<a href="/myapp/search/list?_ethnicity=&_ethnicity=&_ethnicity=&_ethnicity=&_ethnicity=&_ethnicity=&_ethnicity=&_ethnicity=&_ethnicity=&_gender=&_gender=&_gender=&accountType=2&ethnicity=1&ethnicity=5&max=3&offset=3" class="step">2</a>
我想分頁鏈接URL可輸出無所有的額外_ethnicity變量,它們會在原始搜索後傳回:
<a href="/myapp/search/list?accountType=2&ethnicity=1&ethnicity=5&max=3&offset=3" class="step">2</a>
我怎樣才能得到參數paginate標籤沒有所有額外的不必要的領域?在功能上它有效,但分頁get請求的URL太長,看起來很可怕。