Ocassional "Blue View"

Ocassional "Blue View"

Hi,

we use GXT 1.4 along with GWT 1.5.3 in our web-application.

On the left hand side, I display a tree and when a user clicks on an item in this tree, an editor on the right hand sides opens up in a TabPanel as a TabItem.
This works _most of the time_. Sometimes, however, instead of the editor, I get a ContentPanel with the style "x-layout-collapsed x-panel" filling the whole screen and obscuring my view. I tried to reproduce the problem by writing a small application that does essentially the same, but without our complex-server logic, but the problem -- naturally -- does not appear in that small program.
However, if I comment out all server-interaction, the problem still appears in our web-application. Do you guys have any idea why GXT could produce this DOM structure:

I know my description is vague at best -- but this bug has got me completely confused! All I can say additionally is that the problem does _no longer appear_ in GXT 2.0.1 -- unfortunatley, updating is not an option right now.

Just to be clear: It is always the same source code that is being executed. Most of the time it works, sometimes, it does not...
I know that some panels are missing, but I know (I debugged it) that always the same Java code is being executed.

I tried to reproduce the problem by writing a small application that does essentially the same, but without our complex-server logic, but the problem -- naturally -- does not appear in that small program.
However, if I comment out all server-interaction, the problem still appears in our web-application.

maybe if you post the code of your small programm it shows some bottlenecks...

This forum needs your help: you got hints from the community and now you have fixed your code? dont just reply with "now its fixed" or "i found the error"! please take the time to post also an detailed answer with the working code.

I have the same experience

I have the same experience

It happens once in 20 times or so. For me, the left hand panel (border layout west) where this problem occurs is collapsed by default. Comparing the div structure to an occassion where it all works normally, I find that all the panels seem to be there in the div structure but some have style="display none". When I remove this style from the firebug HTML editor, the invisible/hidden panels show up. I am wondering why this style is being set in the first instance (and unpredictably too!!).

I finally found the cause and a solution

I finally found the cause and a solution

This problem only happened in cases where the panel in question is collapsed by default. You see the blank screen when you click the panel header (vertical header for east and west border layout panels) or you miss the collapse button slightly. The collapse had been done before the content was actually rendered/drawn. Clicking "preview" then previews an empty panel.
My solution was to delay collapsing until after rendering. This I achieved with the scheduled command for example:
Scheduler.get().scheduleDeferred(new ScheduledCommand() {
@Override
public void execute() {
//collapse east and west by default
layout.collapse(LayoutRegion.WEST);
layout.collapse(LayoutRegion.EAST);
}
});

It may be trickier in your architecture if you do not have the information about which one needs collapsing at the point of creating the layouts.