Monday, October 18, 2010

'null' is null or not an object error

Hi everyone,

My app has 2 parts, a nav and a center part for showing the views I
built. So when a menu is clicked on the menu, the corresponding view
will be shown in the center part.

mainView extends Panel {
Panel nav;
Panel center;
navData = new BorderLayoutData(RegionPosition.WEST);
borderPanel.add(nav, navData);
centerData = new BorderLayoutData(RegionPosition.CENTER);
borderPanel.add(center, centerData);
this.add(borderPanel);
mainApp = new Viewport(this);
}

and function that clear and shows the widgets in center part:
public void setCenter(Widget w) {
center.clear();
center.add(w);
mainApp.doLayout();
}

All the widgets extends Panel and have a below get method
public Widget getViewWidget(){
return this;
}

The problem is that the first 5 or 6 views can be shown without
problem in center part. But once I clicked more than 5 or 6, only part
of the view or nothing shown in the center part. And I got this 'null'
is null or not an object or 'this.el' is null or not an object from
ext-all.js line 123 or 58.

for example, when i click on menu1 and it is shown ok. After awhile i
click menu1 again, only part of menu1 is shown.

Seems to me that this error occur from the doLayout call. And ideas on
why is that? Pls help. thanks alot


--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate