Wednesday, September 23, 2015

Celltable w/SelectionModel not firing onSelectionChange event

I have a CellTable that doesn't seem to want to follow my defined SelectionModel. I know I must be missing something dumb, does anyone see what I've done wrong here?

public class QuoteTable extends CellTable<QuoteListProxy> {
Column<QuoteListProxy, Long> editColumn;
Column<QuoteListProxy, String> quoteColumn;
Column<QuoteListProxy, String> referenceColumn;
Column<QuoteListProxy, Date> dateColumn;
Column<QuoteListProxy, String> contactColumn;
Column<QuoteListProxy, QuoteListProxy> summaryColumn;
ListHandler<QuoteListProxy> columnSortHandler;
QuoteSearchSnapshot quoteSearchSnapShot;

public final static String QUOTE = "Quote#";
public final static String REFERENCE = "Reference";
public final static String CONTACT = "Contact";
public final static String QUOTE_DATE = "Date";

final SingleSelectionModel<QuoteListProxy> selectionModel = new SingleSelectionModel<QuoteListProxy>();

public QuoteTable() {
selectionModel.addSelectionChangeHandler(new SelectionChangeEvent.Handler() {
       public void onSelectionChange(SelectionChangeEvent event) {
    QuoteListProxy selected = selectionModel.getSelectedObject();
         if (selected != null && quoteSearchSnapShot != null) {

private void initTable() {

for (int i = 0; i < this.getColumnCount(); i++) {
Column c = this.getColumn(i);
if (c.isSortable()) {

My initColumns() builds out a few TextCells and a few ActionCells. I know that the SelectionModel will always fire, even when an ActionCell is clicked, and that is the behavior I want but the SelectionChange event does not ever seem to get triggered. When I debug, I never even hit the breakpoint I have set in the onSelectionChange() method I've defined. Any insight would be appreciated? :)

You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
For more options, visit

No comments:

Post a Comment