View Full Version : [OPEN][1.0 beta3] Table: fill on app start, header sort column, show/hide column bugs

25 May 2008, 2:02 PM
I am trying to use GXT 1.0 beta3 Table component and have noticed its strange behavior.
I created simple Table with three columns: "Alias", "Host", "Port" and when Render event occurs I fill this table with 5 items.
When my GWT application starts, the last (5-th) item renders but then disappears. You can see this on the attached animated gif.

I think this concern with loading splash <div> that hides after viewport is rendered.

For testing this I added to my app a Timer in the Render event listener. So, if the time of the timer schedule commensurable with the time of splash <div> hides time, the last item disappears after viewport is rendered. (for example: if tm.schedule(100); then item disappears, if tm.schedule(1000); everything is fine).
Initially table is sorted by first column. When I try to sort, for example, by second - first column header still marked as 'sorted' and you can see how table is sorted by two columns at the same time.
When I try to hide one column and then show it again table elements hide and show correctly, but when the header column was hidden it never could be shown again.Here is the code:

public class GxtDemo implements EntryPoint {

public void onModuleLoad() {

protected void basicTableTest() {
Viewport viewport = new Viewport();
viewport.setLayout(new CenterLayout());
ContentPanel cp = new ContentPanel(new FitLayout());
cp.setHeading("BasicTable test");

final TableColumn columns[] = {
new TableColumn("ALIAS_ID", "Alias", 200),
new TableColumn("IPADDR_ID", "Host", 100),
new TableColumn("PORT_ID", "Port", 50),

TableColumnModel tcm = new TableColumnModel(columns);
final Table<RowSelectionModel> table = new Table<RowSelectionModel>(tcm);
table.sort(0, Style.SortDir.ASC);
table.addListener(Events.Render, new Listener<ComponentEvent>() {
private Timer tm;
public void handleEvent(ComponentEvent be) {
tm = new Timer() {
public void run() {


protected void fillTable(Table<RowSelectionModel> table) {

Object[][] serversData = {
new Object[] {"Alias 1", "", "1114"},
new Object[] {"Alias 2", "", "1113"},
new Object[] {"Alias 3", "", "1112"},
new Object[] {"Alias 4", "", "1111"},
new Object[] {"Alias 5", "", "1110"},

for (Object[] data : serversData) {
TableItem ti = new TableItem(data);

25 May 2008, 2:44 PM
...out of curiosity, how did you create the animated gif from screenshots/capture? (hoping it was a simple free tool)

25 May 2008, 10:25 PM
I create screenshots/capture using CamStudio

27 May 2008, 8:36 PM
Yes, there is a very big bug with the removal of the splash div. I wasted a couple of hours trying to figure out what was happening to my content. The fix is in SVN.

27 May 2008, 9:10 PM
Try to resize any table column in IE to make it narrower than the text in the header title. In IE the header goes out of sync from the rest of the table. This is reproducible in the Explorer demo.