EDIT: based on feedback, erased original Q. completely and reposting in better language
I wish to access a request or params variable and pass it between the controller and the gsp. i understand that the params object contains everything that a querystring has.
All the examples I see are all Model driven. I have looked up docs online and I have two books - beginning-grails and definitive guide to grails, both have database driven examples on params. I want to understand how params can be set and accessed. All I read everywhere is that it is a map of request variables.
My scenario is as follows: I have a controller which sends a list (not from a database) to the GSP. I thought of passing a "params" variable between GSP and the controller.
To reiterate, the scenario I have is not a Model driven one. I am looking to iterate thru a list of items (with no database count known) and is driven by user click. I thought of implementing something like what twitter has "the-more-button-on-the-bottom". have a simple remotelink at the bottom of the page with a new page counter, which i access in the controller and pass to my service class for the new part of list.
controller code:
//access params from request
int pageInt =params["pagecount"] // *i always get null here*
callMyList(pagecount) //calls my service method to get next set of list for next page
GSP (not actual) code
<%= params.get("pagecount") %>
<%= nxtPage = pagecount++ %>
...
<%params["myId"] = nxtPage%>
<g:remoteLink action="list" id="${nxtPage}">More</g:remoteLink>