I have a multiselect ListBox in a FormPanel in GWT. I have set the name of the listbox to "foo" via ListBox.setName(). When I post the form, I see that all of the selected开发者_如何学C values get posted, but all are bound to the same name "foo". So I seemingly cannot get each of the posted values (I am using Django/Python server-side to handle the post). When I access params['foo'] in Django, I only pick up the last posted value.
How do I get to all of the values?
Thanks.
Use params.getlist('foo')
.
See the documentation for QueryDict objects.
精彩评论