Hi!
I have an app where I try to cache widget in a HashMap and then
replace them in the a centerpanel when the user hits fwd/bwd buttons..
This works fine in Safari/Firefox/Chrome but not in IE7 where the
panel gets updated but the content is empty.. I guess it happens since
the widget in the HashMap is later being cleared by the Panels clear
method? I have tried to use remove and removeAll with autodestroy
false but then the panel is just containing all widget after each
other.. My last resort was to try and clone the widget before adding
it to the cache but clone doesn't seem to work in gwt. Anyone have an
idea what to do or is it just a bad idea caching widgets? It's just
frustating since its works in the other browsers..
My code is below:
public static Panel createPanelToUpdateCenter(Widget widget, String
title, String history) {
currentState = history;
History.newItem(history);
if (cacheOfVisitedWidgets.containsKey(history)) {
return (Panel) cacheOfVisitedWidgets.get(history);
} else {
Panel panel = new Panel();
panel.setTitle(title);
panel.setAutoScroll(true);
panel.add(widget);
cacheOfVisitedWidgets.put(history, panel);
return panel;
}
}
public void changeContent(Panel panelChange) {
centerPanel.clear(); Works in all browser except IE7
//centerPanel.removeAll(false); //doesn't work
//centerPanel.remove(centerContentPanel, false); //doesn't work
centerContentPanel = panelChange;
centerPanel.add(centerContentPanel);
centerPanel.doLayout();
}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"GWT-Ext Developer Forum" 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/gwt-ext?hl=en
-~----------~----~----~----~------~----~------~--~---