开发者

How to set up binding for an array with Gwittir and GWT?

开发者 https://www.devze.com 2023-01-16 12:26 出处:网络
I have an list of checkboxes on a GWT widget using Gwittir.I want to bind these checkbox values in my view to some values in my Model so that I can tell which ones are selected.How can I set up a bind

I have an list of checkboxes on a GWT widget using Gwittir. I want to bind these checkbox values in my view to some values in my Model so that I can tell which ones are selected. How can I set up a binding to do this?

For a single value (one not in an array), I've been doing this:

Binding binding = new Binding();
binding.getChildren().add(
     new Binding(viewObj.getTextBox(),"value",modelObj,"textValue"));

But I don't know how to transition this to work for an 开发者_StackOverflow社区array of items. Please help.


I ended up not using Gwittir for those parts which dealt with arrays of data. Instead I manually transferred the data from my view to my controller when the user clicked a button which would record the state of all the checkboxes in an array to an array of values in the controller.

0

精彩评论

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

关注公众号