Reputation: 7788
I'm trying to get a list of ids from my params, but when I read them, I end up with different values than the expected values. Expected values are 2 and 8, I'm ending up with 50 and 56. Does anybody know where these results are coming from?
Code
println 'Params ' + params
Long[] departments = params.list('departmentIds');
println 'departmentIds ' + departments
Output
Params [start:2016-02-28, departmentIds:[2, 8], end:2016-04-10, action:calendarRequest, format:json, controller:calendar]
departmentIds [50, 56]
Upvotes: 0
Views: 51
Reputation: 1195
println 'Params ' + params
Long[] departments = params.list('departmentIds').collect { Long.parseLong(it) }
println 'departmentIds ' + departments
Or something like that...
Upvotes: 2