// Removes alignments, icons and headers from hidden columns
if (this.visibleColumns != null) {
- disableContentRefreshing();
+ boolean disabledHere = disableContentRefreshing();
try {
for (final Iterator i = this.visibleColumns.iterator(); i
.hasNext();) {
}
}
} finally {
- enableContentRefreshing(false);
+ if (disabledHere) {
+ enableContentRefreshing(false);
+ }
}
}
*/
public void setContainerDataSource(Container newDataSource) {
+ disableContentRefreshing();
+
if (newDataSource == null) {
newDataSource = new IndexedContainer();
}
// Assure visual refresh
resetPageBuffer();
- refreshRenderedCells();
+ enableContentRefreshing(true);
+
}
/* Component basics ***************************************************** */
* bypass expensive content for some reason (like when we know we may have
* other content changes on their way).
*
+ * @return true if content refresh flag was enabled prior this call
*/
- protected void disableContentRefreshing() {
+ protected boolean disableContentRefreshing() {
+ boolean wasDisabled = isContentRefreshesEnabled;
isContentRefreshesEnabled = false;
+ return wasDisabled;
}
/**