E_lexy
23 Oct 2009, 1:45 AM
After searching and reading I have found something that seems to behave different than specified. As I am a newby in Ext, I am probably wrong in this assumption, so I post it here to find out.
I have created a formpanel like this:
var fs = new Ext.FormPanel({
frame: true,
labelAlign : 'right',
labelWidth : 85,
width : 340,
autoScroll : true,
bodyCfg: {
tag: 'center',
cls: 'x-panel-body', // Default class not applied if Custom element specified
html: 'Message'
}
In my initial ignorance and then I created a function to update the content of the formpanel like this:
....
upd = fs.getUpdater(); //updater of the panel inside the window
upd.update({
url: url,
scripts: true,
text: 'Loading...'
});
....The url is a regular HTML form generated the symfony Framework. example:
<form action="/frontend_dev.php/discussie/create" method="post" >
<table>
<tbody>
<tr>
<th><label for="idea_discussion_title">Title</label></th>
<td>
<div id=error-title></div>
<input type="text" name="idea_discussion[title]" id="idea_discussion_title" /> </td>
</tr>
<tr>
<th><label for="idea_discussion_article_text">Article text</label></th>
<td>
<div id=error-article_text></div>
<textarea rows="4" cols="30" name="idea_discussion[article_text]" id="idea_discussion_article_text"></textarea> </td>
</tr>
</tbody>
</table>
</form>Since it worked in FF (development machine), I went with it for a number of formPanels. Then when testing in IE came around, it turned out not to work. After reading the docs again, i realized that a formpanel uses Ext.decode() to interpret what comes from the XHR call (and a regular Panel just loads it as is).
Why did it work in FF? does it "fall back" to plain loading when Ext.Decode() fails?
I have created a formpanel like this:
var fs = new Ext.FormPanel({
frame: true,
labelAlign : 'right',
labelWidth : 85,
width : 340,
autoScroll : true,
bodyCfg: {
tag: 'center',
cls: 'x-panel-body', // Default class not applied if Custom element specified
html: 'Message'
}
In my initial ignorance and then I created a function to update the content of the formpanel like this:
....
upd = fs.getUpdater(); //updater of the panel inside the window
upd.update({
url: url,
scripts: true,
text: 'Loading...'
});
....The url is a regular HTML form generated the symfony Framework. example:
<form action="/frontend_dev.php/discussie/create" method="post" >
<table>
<tbody>
<tr>
<th><label for="idea_discussion_title">Title</label></th>
<td>
<div id=error-title></div>
<input type="text" name="idea_discussion[title]" id="idea_discussion_title" /> </td>
</tr>
<tr>
<th><label for="idea_discussion_article_text">Article text</label></th>
<td>
<div id=error-article_text></div>
<textarea rows="4" cols="30" name="idea_discussion[article_text]" id="idea_discussion_article_text"></textarea> </td>
</tr>
</tbody>
</table>
</form>Since it worked in FF (development machine), I went with it for a number of formPanels. Then when testing in IE came around, it turned out not to work. After reading the docs again, i realized that a formpanel uses Ext.decode() to interpret what comes from the XHR call (and a regular Panel just loads it as is).
Why did it work in FF? does it "fall back" to plain loading when Ext.Decode() fails?