weixin_42393259
weixin_42393259
2010-08-08 15:21
浏览 338

用Ext上传文件后台不能获取数据

用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();
            };           
    }
};

};

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

2条回答 默认 最新

  • works001
    works001 2010-08-08 15:57
    已采纳

    看看jar包 都引了吗
    commons-logging-1.1.jar
    freemarker-2.3.8.jar
    ognl-2.6.11.jar
    struts2-core-2.0.6.jar
    xwork-2.0.1.jar
    commons-io-1.3.1.jar
    commons-fileupload-1.2.jar

    点赞 评论
  • hermit1216
    hermit1216 2010-08-08 17:13

    服务器返回数据类型设为text/html.
    Response. setContentType("text/html; charset=utf-8");

    点赞 评论

相关推荐