用Ext做了一个上传的窗口,点击上传按钮后,firebug报如下错误:
[color=red]missing ) in parenthetical
(
HTTP Status 500 -
ex
ext-all-debug.js (第 12434 行)[/color]
后台也获取不到任何数据,只有上传的进度条不停地走,请大家帮忙看一下哪儿有问题(附页面截图)。下面是js代码
Ext.ns('Flow.deployProcess');
Flow.deployProcess = function(){
return {
getForm: function(){
var processPanel = new Ext.form.FormPanel({
id: 'processDefinition',
title: '上传流程文件',
frame: true,
lableWidth: 70,
bottonAlign: 'center',
defaults: {allowBlank: false},
fileUpload: true,
items:[
{
xtype: 'textfield',
inputType: 'file',
//fieldLable: '上传流程文件',
name: 'process',
id: 'processName',
margins: '50 0 0 0'
}
],
buttons:[
{text:'上传',
handler: function(){
if(Ext.fly('processName').dom.value ==null || Ext.fly('processName').dom.value == ""){
Ext.Msg.alert('信息','请选择要部署的流程文件');
return false;
}
var form = processPanel.getForm();
if(form.isValid()){
form.doAction('submit', {
url : 'deployProcess.action',
method : 'post',
waitTitle:"请稍候",
waitMsg : '正在上传...',
success : function(form,action){
Ext.Msg.alert('信息',action.result.resultMap.message);
},
failure : function(form,action){
Ext.Msg.alert('信息',action.result.resultMap.message);
},
scope : this
});
}
}
},
{text: '重置',
handler: function() {
processPanel.getForm().reset();
},
scope: this}
]
});
return processPanel;
},
getDialog: function(id) {
var panel = Ext.getCmp(id);
var form = this.getForm();
var dlg = new Ext.Window({
id: 'uploadDialog',
renderTo: panel,
width: 400,
height: 300,
title: '',
plain: true,
closable: true,
resizable: false,
frame: true,
layout: 'fit',
closeAction: 'hide',
border: false,
modal: true,
items: [form]
}); //dlg
return dlg;
},
render: function(id){
if (!this.dlg) {
this.dlg = this.getDialog(id);
this.dlg.show();
};
}
};
};