My (dirty) workaround was extending AbstractCell class and adding the 
custom code within:

@Override
public void onBrowserEvent(final Context context, final Element parent, 
final C value,
                final NativeEvent event, final ValueUpdater<C> 
valueUpdater) { 

                 HasData<T> data = this.column.getTable();
                SelectionModel<? super T> selectionModel = 
data.getSelectionModel();

                if (selectionModel instanceof SingleSelectionModel) {
                    T val = (T) ((SingleSelectionModel<? super T>) 
selectionModel).getSelectedObject();
                    userChoiceHandler.onUserChoice(val);
                }
}

method.

btw, has anyone an idea  why the method getSelectionModel() from HasData<T> 
class returns
SelectionModel<? super T>
instead of 
SelectionModel<T>
?


On Thursday, October 18, 2012 2:01:33 PM UTC+2, Marius Grama wrote:
>
> I have a scenario where i am working with a GWT DataGrid on which when the 
> user makes a double-click an event should be raised containing the 
> information about the model bean of the selected selected row.
> e.g : For a DataGrid containing informations about  persons (columns: 
> first name , last name, age) when a double click (or enter key on the 
> currently selected row of the datagrid) is made on one of the rows of the 
> datagrid a MessageBox should appear containing the full name person 
> selected.
>
> I've tried for some time to implement this scenario, but I haven't found 
> so far an elegant (and simple) way to implement it.
>
> Can anybody assist me on this problem?
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/JQ33gW88RrwJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to