Hello all,
New to GWT and liking it. Having some issues with my DataGrid not
displaying in certain panels. In the simplified example below, if I
add the dataGrid directly to the RootLayoutPanel (commented out now),
it displays the dataGrid correctly. If I add the dataGrid inside a
VerticalPanel, nothing displays on the screen. It appears to be
producing divs and html which you can see if you "right-click | select
all" on the blank screen and then "right-click | view source". But,
nothing is actually being displayed visually by the browser (Firefox
7).
Any idea what I'm missing?
----------------------------------------------------------------------
package test.client;
import java.util.ArrayList;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.cellview.client.DataGrid;
import com.google.gwt.user.cellview.client.TextColumn;
import com.google.gwt.user.client.ui.RootLayoutPanel;
import com.google.gwt.user.client.ui.VerticalPanel;
public class Test implements EntryPoint {
public void onModuleLoad() {
DataGrid<String> dataGrid = new DataGrid<String>();
dataGrid.addColumn(new TextColumn<String>() {
public String getValue(String object) {
return object.toString();
}
}, "Category");
ArrayList<String> strings = new ArrayList<String>();
strings.add("abc");
strings.add("def");
strings.add("ghi");
dataGrid.setRowData(strings);
VerticalPanel contentArea = new VerticalPanel();
contentArea.add(dataGrid);
RootLayoutPanel.get().add(contentArea);
//RootLayoutPanel.get().add(dataGrid);
}
}
----------------------------------------------------------------------
Thanks,
Aaron
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
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.