开发者

add checkbox item inside Listbox gwt

开发者 https://www.devze.com 2023-02-17 10:47 出处:网络
How can we add Checkbox item inside Listbox or t开发者_JAVA技巧here is a checkboxlist i did not see ?

How can we add Checkbox item inside Listbox or t开发者_JAVA技巧here is a checkboxlist i did not see ?

i want to get a list of checkboxes that i will after filter a list of appointments by checking those checkboxes

GWT 2.2 , java , eclipse


You can't add widgets like a CheckBox to a ListBox, nor is there a CheckBoxList, but you can use a CellList with a CompositeCell (TextCell + CheckboxCell) and it'll do what you want.


I don't think you can add checkboxes within the Listboxe. You can probably create a List box with multiple selection enabled.

ListBox list = new ListBox();

list.setVisibleItemCount(10);
list.setMultipleSelect(true);


Here is something using GXT's XTemplate (if you want only GWT then use Template). Other than that, how you pass your data is something you can define, but if you go with GXTs ModelData then this could work.

https://gist.github.com/Aadi1/4949994

0

精彩评论

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