简体   繁体   English

GWT自定义listview与单选按钮和复选框

[英]gwt custom listview with radiobutton & checkbox

I have a scenario in which I'll have a list view which will have the combination of checkboxes and radio buttons , in other words , the listview will have 我有一个场景,其中有一个列表视图,其中将包含复选框和单选按钮,换句话说,该列表视图将具有

option1 checkbox[] option1复选框[]

option2 radiobutton ()yes ()no option2单选按钮()是()否

Can you please anyone tell me how do I do that? 能否请任何人告诉我我该怎么做?

What exactly you mean by list view? 列表视图到底是什么意思? If you want to create a list of controls that consist of a checkbox and radio box, and to be selected only one list element at a tinge, Create a CellList with as custom cell of type CompositeCell (docs link http://www.gwtproject.org/javadoc/latest/com/google/gwt/cell/client/CompositeCell.html ). 如果您要创建一个由复选框和单选框组成的控件列表,并且要仅选中一个列表元素,请创建一个CellList,并将其作为CompositeCell类型的自定义单元格(文档链接http://www.gwtproject .org / javadoc / latest / com / google / gwt / cell / client / CompositeCell.html )。 Or you can create your own user defined cell by extending AbstractCell class and defining your requirement by overriding the render method. 或者,您可以通过扩展AbstractCell类并通过覆盖render方法定义需求来创建自己的用户定义的单元格。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM