I'm sorry.. I can't write English..

I make cellTable..

when button click  all checkboxcell is uncheck..

↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓   image url..  ↓↓↓↓↓↓↓↓↓↓↓↓
http://postfiles10.naver.net/20101229_73/isotone_12936152462850Ouse_PNG/ask.png?type=w3


It's very hard...

↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ source code ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
table = new CellTable<Contact>();
TextColumn<Contact> nameColumn = new TextColumn<Contact>() {
@Override
public String getValue(Contact object) {
 return object.name;
 }
};
  final CheckboxCell cCell = new CheckboxCell(false, true);
  final Column<Contact, Boolean> checkColumn = new Column<Contact,
Boolean>(cCell) {
    @Override
  public Boolean getValue(Contact object) {
    // Get the value from the selection model.
    return selectionModel.isSelected(object);
    }
    };
    table.setSelectionModel(selectionModel);
    selectionModel.addSelectionChangeHandler(
        new  SelectionChangeEvent.Handler() {
             public void onSelectionChange(SelectionChangeEvent event)
{
                     Contact selected =
selectionModel.getSelectedObject();
              }
       });
     table.addColumn(checkColumn);
 table.addColumn(nameColumn, "Name");
 table.setRowCount(CONTACTS.size(), true);
 table.setRowData(0, CONTACTS);
 Button btn = new Button("clear");
 btn.addClickHandler( new  ClickHandler() {
    public void onClick(ClickEvent event) {
      Boolean f = new Boolean(false);
        //  for ( int i = 0; i < table.getRowCount(); i++ ){
        // Context context = new Context(i + table.getPageStart(),
0,   checkColumn);
        //  cCell.render(context, f, new SafeHtmlBuilder());
        //  }
     }
})      ;

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to