Sunday, January 31, 2010

Working with GWT, beginning with the Getting Started tutorial, trying to deploy Bookstore to GAE in one weeked! Almost got stumped adding ClickHander to a Grid, thankfully someone posted this solution,

// listen for mouse events on the results grid
resultsGrid.addClickHandler(new ClickHandler() {
   public void onClick(ClickEvent event) {
      final HTMLTable table = (HTMLTable) event.getSource();
      final HTMLTable.Cell cell = table.getCellForEvent(event);
      // cell.getCellIndex() COL
      // cell.getRowIndex() ROW
   });

Very cool!

No comments: