Reputation: 245
In my grails project, can I use params map (object of GrailsParameterMap) as java.util.HashMap on application level ?
I want to do this for using Serializability of java.util.HashMap.
I can use params as java.util.HashMap
everywhere in the code. But how can i achieve this on application level ?
I am using grails 1.3.7
Thanks in advance.
Upvotes: 1
Views: 4016
Reputation: 3407
Well, following @Gregg suggestion, of pulling the data out of the params map into an object, you can do it like this:
Map paramsMap = new HashMap()
params.each {key, value ->
paramsMap.put(key, value)
}
And save this HashMap in the session. I hope it helps.
Upvotes: 2