I have a list of Team objects that have an Integer seed property. I want to edit all the teams\' seeds at once, in a single form. I\'m sure
I finally figured out how to do this without any shenanigans.
Forget about the hidden parameter and just use the team ID in the seed parameter. In the GSP:
...
Then, in the controller:
params.teams.seeds.each { teamId, seed ->
def team = Team.get(teamId.toInteger())
team.seed = seed.toInteger()
team.save()
}
redirect(action:list)
Works like a charm.