Hi John, That is the heart of the problem, but it might be a little more complicated than it sounds.
I am calling insertRow() on the CachedTableModel that my PagingScrollTable uses. This triggers a rowInserted table listener and ends up calling PagingScrollTable.insertAbsoluteRow(). I'm not sure if this is the best place to remove the emptyTableWidget. Right now insertAbsoluteRow() doesn't remove the emptyTableWidget or refresh the table data. I don't know if this is a bug or not. Currently we only remove the emptyTableWidget in setData() if there is row information. I don't return any row data for an emty table with a row of text boxes that need to be filled out, so maybe I need to change that behavior or my end. I really appreciate your feedback. Thanks for your help! -Brad On Oct 26, 9:18 pm, "John LaBanca" <[EMAIL PROTECTED]> wrote: > Is the problem that calling insertRow() does not remove the emptyTableWidget > and display the new row? It that is the case, it sounds like a bug. Adding > a row using insertRow() should hide the emptyTableWidget. > Thanks, > John LaBanca > [EMAIL PROTECTED] > > On Sat, Oct 25, 2008 at 3:24 PM, Brad Larson <[EMAIL PROTECTED]> wrote: > > > I'm having a little trouble after pulling up to the latest gwt- > > incubator with the PagingScrollTable. I use this widget to display a > > table of data and have a button to allow the user to add a row. When > > this button is clicked, I want a new row to be added which has text > > boxes instead of labels so the user can type in data to enter into the > > table. When they are done filling in the boxes, they click a 'Done' > > button and the data is sent to the server and added to the > > cachedTableModel. > > > This works fine if the table already contains data, but is broken for > > empty tables now that they have the display: attribute set to false. > > I am adding the row by calling cachedModel.insertRow(); and > > dataTable.setWidget(row, col, textBoxWidget); for all cells in the new > > row. The ideal fix for me is to call > > setEmptyTableWidgetVisible(true); on my PagingScrollTable, but I'm > > open to alternatives. Is there a better way I should handle this use- > > case? > > > Thanks in advance for any help!! > > -Brad --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~----------~----~----~----~------~----~------~--~---