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 任务A:大数据平台搭建(容器环境)怎么做呢?
  • ¥15 r语言神经网络自变量重要性分析
  • ¥15 基于双目测规则物体尺寸
  • ¥15 wegame打不开英雄联盟
  • ¥15 公司的电脑,win10系统自带远程协助,访问家里个人电脑,提示出现内部错误,各种常规的设置都已经尝试,感觉公司对此功能进行了限制(我们是集团公司)
  • ¥15 救!ENVI5.6深度学习初始化模型报错怎么办?
  • ¥30 eclipse开启服务后,网页无法打开
  • ¥30 雷达辐射源信号参考模型
  • ¥15 html+css+js如何实现这样子的效果?
  • ¥15 STM32单片机自主设计