Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Indexed Properties with no index

 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Grails 1.3.1

I am using a jQuery library that sends a serialized parameter map to the server and it is formatted like so....

item[]=1&item[]=2&item[]=3

In my controller, when I do println params, it comes out...

[item[]: [1, 2, 3]]

I can't seem to get this data out of params in my controller, however. What am I missing?

BTW, I have also asked this question on SO here and will update this thread with responses if I get any. They just seem to get a bit more Grails traffic than we do.
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
params['agendaItems[]']

That is how I had to access the array.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic