PDA

View Full Version : Ext.panel.Panel stateful starting position



fdp
13 Jun 2013, 6:12 AM
Hi

I'm upgrading from 4.1.1 to 4.2.1 and I'm having problems for stateful starting position of panels.

I have this for my panel:

initComponent: function() {
Ext.apply(this, {
autoScroll: true,
width: 500,
height: 300,
stateful: true,
stateId: 'MyPanel',
stateEvents : ["resize", "move"]
});
this.callParent(arguments);
},


When I call mypanel.show() the starting position is retrieved form stateful cookie

Now with 4.2.1 the same code does not work, the panel is showed always at center of screen.

Any hints?

slemmon
16 Jun 2013, 9:55 PM
I thought only the window component would restore x/y position (not panels).
Is that what you're extending is window, not panel?

If so, what if you comment out the stateEvents line for 4.2.1?

fdp
17 Jun 2013, 5:25 AM
You are right, x/y position are "stateful" only for windows and not for panels, thanks.