PDA

View Full Version : Ext.Direct fileUpload work in browser not in AIR



slon
9 Jul 2010, 12:33 AM
I have a simple extjs (3.2.2) script and he perfectly work in browser:


var form = new Ext.form.FormPanel({
api: {
submit: CRM.ss.Mailer.add
},
fileUpload: true,
width: 400,
renderTo: 'test',
items: [{
xtype: 'textfield',
anchor: '100%',
name: 'to',
fieldLabel: 'To'
},
new Ext.ux.form.FileUploadField({
allowBlank: true,
emptyText: 'Select an file to attach',
fieldLabel: 'Attachment',
name: 'files',
anchor: '100%',
buttonText: '+'
}), {
xtype: 'panel',
buttonAlign: 'center',
border: false,
buttons: [
{
text: 'Submit',
handler: function(){
form.getForm().submit()
}
}
]
}]
});


When i execute this script from AIR (of course with all necessary ext/air scripts) in debug i see:


TypeError: Null value

at app:/lib/ext/ext-all-debug-w-comments.js : 39445

at app:/lib/ext/ext-all-debug-w-comments.js : 39643

at app:/lib/ext/ext-all-debug-w-comments.js : 39965

runCallback at app:/lib/ext/ext-all-debug-w-comments.js : 9830

cb at app:/lib/ext/ext-all-debug-w-comments.js : 9837

h at app:/lib/ext/ext-all-debug-w-comments.js : 2946

undefined at undefined : undefined


If fileUpload set to false all work ok (of course without file upload).

Any ideas?
Thanks