简体   繁体   English

GWT单元格表从一行取值

[英]GWT cell table take value from a row

i have a problem 我有个问题

i have a GWT celltable with many information on each row, i need to extract a single information for each row; 我有一个GWT细胞表,每一行都有很多信息,我需要为每一行提取一个信息;

can explain me how can i do? 可以解释我该怎么办?

You have to add a "SelectionModel" to your "CellTable" widget: 您必须在“ CellTable”小部件中添加“ SelectionModel”:

  1. Choose a standard SelectionModel or write your own. 选择一个标准SelectionModel或编写自己的模型。
  2. Add this SelectionModel to the cell widget using setSelectionModel(SelectionModel). 使用setSelectionModel(SelectionModel)将此SelectionModel添加到单元小部件中。
  3. Create a SelectionChangeEvent.Handler implementing onSelectionChange. 创建一个实现onSelectionChange的SelectionChangeEvent.Handler。
  4. Add this handler to the SelectionModel using addSelectionChangeHandler. 使用addSelectionChangeHandler将此处理程序添加到SelectionModel中。

See this sample for more information. 有关更多信息,请参见此样本

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

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