Re: Is there any way to have event handlers for a cell in a CellTable that isn't in a column?
On Saturday, September 7, 2013 1:51:58 AM UTC+2, Steve C wrote:
Actually, I'm using my own parallel to ActionCell that copies most of it's code and adds a few things. I couldn't extend ActionCell directly due to something with private or package access, if I recall correctly. I've used that same cell in columns and it's worked OK. (Sorry about the red herring with ButtonCell - I was speaking generally about a cell with a button, and forgot that there actually was a ButtonCell.)
…and my bad, I'm not familiar with CellTable's header and footer and forgot they have a ValueUpdater so you can use whichever Cell you want (ButtonCell or ActionCell or whatever)
I've added a CellPreviewHandler to the table to print a console message when invoked, and also print a console line from onBrowserEvent in my ActionCell, and neither of them triggers when I click my buttons. Looking though the code for several of the API classes involved, it seems that the event path goes through the columns. (As an aside, I'm not all that fond of using an updater when there's nothing to update - somewhat the same line of reasoning that keeps me from just adding a column. But I've seen that approach taken in a few examples, like the CustomDataGrid, although that also has the associated cells in a column.)
I suspect your custom footer renderer to "break the contract".
Apparently, your footerBuilder has to return a Header for the clicked TD (isHeader has to return true, and getHeader has to return a Header), and the Header is responsible for handling the click (generally by routing it to its Cell).
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home