weixin_42393259 2010-08-08 15:21
浏览 355
已采纳

用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 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

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记