When you wnat to upload any file use getForm().fileUpload= true and when want a simple submit use
getForm().fileUpload= false; and pass the params. when you do fileUpload =true you wont be able to get the params after submit.


Code:
var url="../urlServlet";
var condition=Ext.getCmp('radioGrp').getValue();
if(condition==='fileUpload')
Ext.getCmp('myuploadform').getForm().fileUpload= true;
else
Ext.getCmp('myuploadform').getForm().fileUpload= false;
Ext.getCmp('myuploadform').getForm().submit({
reset:false,
url: url,
waitMsg:'Uploading File..',
timeout: 30000,
params:{filepath:path},
success: function(form, action)
{extAlert(action.result.msg);
Ext.getCmp('myuploadform').getForm().reset();},
 failure: function(form,action)
{extAlert(action.result.msg);}
});