PDA

View Full Version : Ext JS Panel and HTML form feilds



jaidengre
30 Apr 2009, 5:24 AM
I am using an ext panel as below

var content = $('panel_1_content').innerHTML;
p = new Ext.Panel({
title: 'Panel',
collapsible:true,
renderTo: 'panel_2',
html: content,
collapsed:true
});

content is now the html rendered inside the div 'panel_1_content'. This contains some form fields which are HTML input box and combo boxes (not ext components)

On submit I see in firebug that these fields get submitted but the I am unable to retain the state after refresh and it always falls back to default. If I render the div without ext panel it works fine. Is there an issue with this approach of rendering html fields inside ext panel?

Condor
1 May 2009, 6:46 AM
That's because you are making a copy of the fields. It would probably work if you used the original fields:

p = new Ext.Panel({
title: 'Panel',
collapsible:true,
renderTo: 'panel_2',
contentEl: 'panel_1_content',
collapsed:true
});

jaidengre
3 May 2009, 9:26 PM
Thanks you so much. This just worked perfect.:)