GWT/SmartGWT

29 views
Skip to first unread message

Glen

unread,
Nov 6, 2009, 9:43:39 AM11/6/09
to Google Web Toolkit, gl...@thewarholics.com
I am just learning to use these components.

I build a very small Dynamic Web Project with Eclipse 3.4 Ganymede
I am using java verison 1.6.0_10, GWT 1.7.0, and SmartGWT 1.3

I have a simple program (see below) that uses a ListGrid and adds it
to
a tab panel. It compiles and runs under Windows. It compiles but
does not
run under Redhat Linux.

I get a stack trace that starts at the line where I add the ListGrid
to the TabPanel
and works its way through the GWT library into SmartGWT and fails at
at com.smartgwt.client.widgets.BaseWidget.setProperty(NativeMethod)
at com.smartgwt.client.widgets.BaseWidget.setAttribute(BaseWidget.java:
498)
at com.smartgwt.client.widgets.Canvas.setWidth(Canvas.java.5453)
:
:
:
at org.glen.test.client.GlenTest.onModuleLoad(GlenTest.java:40)



/**
*
*/
package org.glen.test.client;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.TabPanel;
import com.smartgwt.client.widgets.grid.ListGrid;
import com.smartgwt.client.widgets.grid.ListGridField;

/**
* @author Glen
*
*/
public class GlenTest implements EntryPoint {

public void onModuleLoad() {
TabPanel tp = new TabPanel();
ListGrid lg = new ListGrid();
lg.setWidth(500);
lg.setHeight(224);
lg.setShowAllRecords(true);
ListGridField nameLGF = new ListGridField("name", "Name");
ListGridField bossLGF = new ListGridField("boss", "Boss");

lg.setFields(new ListGridField[] { nameLGF, bossLGF});
lg.setData(TestData.getRecords());
lg.setCanResizeFields(true);

tp.add(lg, "Employees");
RootPanel.get().add(tp);
}
}

mariyan nenchev

unread,
Nov 6, 2009, 10:42:10 AM11/6/09
to google-we...@googlegroups.com

g p

unread,
Nov 7, 2009, 11:12:36 AM11/7/09
to google-we...@googlegroups.com
Yes, do ask at the above mentioned forum, but as a general rule, try not to mix the two libraries. Stick to SmartGWT widgets. The two libraries do not behave well to each other when they are part of the same panel etc. For your case have a look at the Tab widgets provided by the SmartGWT library (i.e. TabSet and Tab classes).

2009/11/6 mariyan nenchev <nenchev...@gmail.com>
Reply all
Reply to author
Forward
0 new messages