Hello GXT Experts!
I am having a stange issue here - very strange indeed.
I designed a simple html template with some static content. The main area features a simple styled html table where the main cell is dedicated to receive a component created by GXT.
The cell - a <td> element - has a unique ID and in the onModuleLoad() method of the GWT component, I just create a new widget containing two simple panel with a RowLayout and add it to the page with
Code:
RootPanel.get("tdId").add( homePage.buildPage() );
The method of the widget class will return a reference to itself. (See code below)
So, when I compile and run my project in GWT hosted mode, everything runs just fine. Also, if I render the same page using IE7, I also see the expected result.
However, when I try to render the same page in FF3 or Google Chrome, my html template shows up, but the two components in my "main area" just won't render. If I examine the page DOM, however, in Firebug, I can see that all elements are there but FF3 (and Chrome) just won't render it.
Any idea what would be wrong with my code below?
Thanks for any help.
-Uli
Code of onModuleLoad method in main component class:
Code:
/**
* This is the entry point method.
*/
public void onModuleLoad()
{
final HomePage homePage = new HomePage();
RootPanel.get("dg3_area").add( homePage.buildPage() );
homePage.layout();
}
Code of widget class called HomePage:
Code:
public class HomePage extends LayoutContainer {
private ContentPanel leftPanel;
private LayoutContainer mainPanel;
public HomePage() {
// set a layout for our home page
final RowLayout layout = new RowLayout(Style.Orientation.HORIZONTAL);
this.setLayout(layout);
// create our two content panels
leftPanel = new ContentPanel();
leftPanel.setFooter(false);
leftPanel.setCollapsible(false);
leftPanel.setScrollMode(Style.Scroll.NONE);
leftPanel.setHeaderVisible(false);
leftPanel.setFrame(true);
leftPanel.setSize(-1, 200);
mainPanel = new LayoutContainer();
mainPanel.setBorders(false);
mainPanel.setSize(-1, 200);
mainPanel.setScrollMode(Style.Scroll.AUTO);
}
public HomePage buildPage() {
// first add some test text here
leftPanel.addText("Left Panel here");
mainPanel.addText("Main Panel here");
this.add(leftPanel, new RowData(0.2, 200.0));
this.add(mainPanel, new RowData(0.8, 200.0));
return this;
}
}