开发者

How do I get all of the values from a GWT multiselect ListBox on a post?

开发者 https://www.devze.com 2023-01-04 11:54 出处:网络
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 p

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消