Is it possible to iterate a VerticalPanel and grab only certain widget.
I know you can do this with a list of string in GWT, but it doesnt work for widgets. I like the short hand iterration, however if there is a longer method, it is welcome as well.
Task: basically determine which checkbox in that panle is selected.
this works: basic foreach
for(string i : my_list)
…
…
this wont: gwt widget
for(checkbox ch : my_vpanel)
…
…
Error I get is: cannot convert from element type Widget to CheckBox
You can iterate the widgets of a ComplexPanel such as
or
or
and to see if a Widget is a type of CheckBox you can use