Re: SelectionCell
I had to roll my own SelectionCell when I needed to do that. The
version I wrote ended up using app specific classes so it's not really
fit for mass consumption.
In general though, start with the SelectionCell code, remove
indexForOption and options, and add a Map<K, List<E>> options in its
place (making K whatever type you need it to be (enum in my case)).
Then fix all the build errors in the rest of the code. :)
In the render and onBrowserEvent methods, you'll probably need to call
context.getKey() to get the row key. If you *don't* use a keyprovider
on your celltable, then the key will be the row object (which is what
I do). Cast the object to what you know it will be and then call the
methods on that object you need to get the key for your options map.
Now you have your list of options per row object.
Not the prettiest code, but it got the job done.
Derek
On Feb 28, 8:47 am, Ani <anapont...@gmail.com> wrote:
> Hello,
>
> Can the SelectionCell have different data on different rows?Could
> anybody give some example on that, please???
> Thank you very much in advance...
--
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-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home