PDA

View Full Version : [2.2] Inconsistent window behavior on first show



systemlevel
27 Sep 2008, 1:21 AM
I've attempted to search for this problem I am facing but I am not finding anything (perhaps my keyword selection isn't correct for this issue). I have a window object that displays incorrectly the first time it pops up and *only* the first time.

The behavior is inconsistent in IE and FF. The screen shots are from FF.

However, after each subsequent time it is popped open to the user it displays correctly. What are some ways to force it to open correctly?

I've attempted to use the public methods to .setHeight(700) and others but the inconsistent behavior remains on that first showing.

The window object:



var winlistingdetails = new Ext.Window({
title : 'Loan Details',
autoScroll : false,
width : 700,
height : 500,
layout : 'fit',
closeAction : 'hide',
plain : false,
modal : false,
maximizable : true,
minimizable : true,
minimize : function() { minimizeDetailsWindow(winlistingdetails,lid,minText); },
frame : true,
tools : [{ id : 'refresh',
qtip : 'refresh',
handler: function(){}
}],
tbar : listingdetailstb,
bbar : listingdetailsbb,
items : [messageborrowerpanel,detailspanel]
});
After the window is displayed I try to force its dimensions:



winlistingdetails.setPosition(205,90);
winlistingdetails.setHeight(500);
winlistingdetails.setWidth(700);

mjlecomte
27 Sep 2008, 6:04 AM
Looks like you're using layout:'fit' with multiple items. 'fit' only manages 1 item. Use an appropriate layout.

systemlevel
27 Sep 2008, 9:49 AM
That is a good point to consider... I actually put it to layout fit to see if by luck that might resolve it. I have removed it but I get that same behavior on the first showing only still.

I'm really at a loss of where to go with this one...

I appreciate the reply,

Darren

mjlecomte
27 Sep 2008, 11:37 AM
What does your code look like when you "remove it"?

systemlevel
27 Sep 2008, 2:00 PM
var winlistingdetails = new Ext.Window({
title : 'Loan Details',
autoScroll : false,
width : 700,
height : 500,
closeAction : 'hide',
plain : false,
modal : false,
maximizable : true,
minimizable : true,
minimize : function() { minimizeDetailsWindow(winlistingdetails,lid,minText); },
frame : true,
tools : [{ id : 'refresh',
qtip : 'refresh',
handler: function(){}
}],
tbar : listingdetailstb,
bbar : listingdetailsbb,
items : [bidformpanel,messageborrowerpanel,detailspanel]
});

mjlecomte
27 Sep 2008, 3:01 PM
Ok, so it looks like you've now gone from layout:'fit' (which manages ONE child item) to a layout of ....... ???


..... no layout. So Ext doesn't know how to manage those child items.

Try these:

http://extjs.com/learn/Ext_FAQ_layout#Common_Mistakes
top of http://extjs.com/deploy/dev/docs/?class=Ext.Container
and http://extjs.com/deploy/dev/docs/?class=Ext.Component&member=render

mjlecomte
27 Sep 2008, 3:03 PM
And discussion here http://extjs.com/deploy/dev/docs/?class=Ext.layout.FitLayout
and http://extjs.com/learn/Ext_2_Overview#Layouts

systemlevel
27 Sep 2008, 3:32 PM
Thanks for the information. Only one of the child items is displayed in the window. The others are floating panels that are initially collapsed and only show up a click of a toolbar button. Anyway, you've provided some good information. I think I'll continue to hack away at it and see if I can't fix it.

Thanks again,

Darren

mjlecomte
27 Sep 2008, 3:55 PM
Well if there are other child panels that float, I don't know why you would register them inside the window? Try layout:fit with just one item. You're not providing enough info to make further suggestions.

systemlevel
27 Sep 2008, 4:56 PM
I have tried doing what you recommended which was a good recommendation to put only one item in the window. I still get the same behavior on the first showing of the window. I had the floating child panels in the window because I intended for those panels be be shown only within the scope of the the window panel even though they do float. That might be a misunderstanding of how it works on my part but either way I still get that inconsistent behavior.

I understand my information seems pretty limited but the problem I have is I don't know what else to put into the forum at this point. I think I'll be able to tweak it around somehow to get that working better.

I appreciate your assistance.

Darren

mjlecomte
27 Sep 2008, 6:08 PM
Post your code here or post your working sample in anonymous ftp sandbox at www.sandbox.extjs-ux.org/yourName/whatever

Or suggest you start simple from demo example window, something vanilla and build from there til it breaks?