FollowSteph.com
18 Aug 2009, 9:13 AM
Hi,
I'm still learning GWT/GXT so this may be a more basic question.
Basically I have 3 classes. Class 1 is: public class DocumentTable extends LayoutContainer. Class 2 is basically the same but another name (FolderTable).
Now the 3rd class is my main class, with the method "public void onModuleLoad()". In I do:
FolderTable folderTable = new FolderTable();
DocumentTable documentTable = new DocumentTable();
new GridDragSource(folderTable.getGrid());
DockPanel dock = new DockPanel();
dock.add(documentTable, DockPanel.CENTER);
dock.add(footerFlowPanel, DockPanel.SOUTH);
where folderTable.getGrid() basically gets the grid object created from the "protected void onRender(Element parent, int index)" method. However the grid object which is instantiated in this method is not yet constructed (ie null). How is this generally coded? Is the instantiation code done in the constructor or on the onRender method? To me it seems that the onRender method is spawned off asynch...
Regards,
Steph
I'm still learning GWT/GXT so this may be a more basic question.
Basically I have 3 classes. Class 1 is: public class DocumentTable extends LayoutContainer. Class 2 is basically the same but another name (FolderTable).
Now the 3rd class is my main class, with the method "public void onModuleLoad()". In I do:
FolderTable folderTable = new FolderTable();
DocumentTable documentTable = new DocumentTable();
new GridDragSource(folderTable.getGrid());
DockPanel dock = new DockPanel();
dock.add(documentTable, DockPanel.CENTER);
dock.add(footerFlowPanel, DockPanel.SOUTH);
where folderTable.getGrid() basically gets the grid object created from the "protected void onRender(Element parent, int index)" method. However the grid object which is instantiated in this method is not yet constructed (ie null). How is this generally coded? Is the instantiation code done in the constructor or on the onRender method? To me it seems that the onRender method is spawned off asynch...
Regards,
Steph