PDA

View Full Version : [CLOSED][3.1]card layout: formreset deletes original value from new cards



buergi
2 Feb 2010, 1:27 PM
Ext Version 5960, Firefox 3.5

After upgrading to 3.1 I got this new behaviour:

I have a form with a card layout. If I reset the form, it deletes all original values from all cards which weren't showed before.



new Ext.FormPanel({
renderTo: Ext.getBody(),
id: 'formpanel',
trackResetOnLoad: true,
width: '400px',
height: 300,
layout: 'card',
activeItem: 0,
buttons: [{
text: 'prev',
handler: function() {
Ext.getCmp('formpanel').getLayout().setActiveItem(0);
}
},{
text: 'next',
handler: function() {
Ext.getCmp('formpanel').getLayout().setActiveItem(1);
}
},{
text: 'Reset',
handler: function() {
Ext.getCmp('formpanel').getForm().reset();
}
}],
items: [{
xtype: 'panel',
layout: 'form',
items:[{
xtype: 'textfield',
fieldLabel: 'test',
value: 'test'
}]
},{
xtype: 'panel',
layout: 'form',
items:[{
xtype: 'textfield',
fieldLabel: 'test1',
value: 'test1'
}]
}]
});



Reproduce the error:
1. 'Reset' the form
2. 'Next' -> The value from the 2nd card is missing

this works:
1. 'Next'
2. 'Prev'
3. 'Reset'
4. 'Next' -> Value is correct

Jamie Avins
2 Feb 2010, 1:46 PM
This looks as if it is working properly in 3.1.1-rc. Have you tried this yet?

buergi
2 Feb 2010, 2:18 PM
yep, seems to be fixed!