惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
美团技术团队
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
月光博客
月光博客
J
Java Code Geeks
Jina AI
Jina AI
罗磊的独立博客
宝玉的分享
宝玉的分享
S
SegmentFault 最新的问题
D
DataBreaches.Net
博客园 - 叶小钗
腾讯CDC
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Last Week in AI
Last Week in AI
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Google DeepMind News
Google DeepMind News
阮一峰的网络日志
阮一峰的网络日志
B
Blog
V
Visual Studio Blog
雷峰网
雷峰网
博客园 - 【当耐特】
Apple Machine Learning Research
Apple Machine Learning Research
Engineering at Meta
Engineering at Meta
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报

博客园 - 白沙河

axure 用中继器实现下拉多选框 excel 常用全局变量 win10 x64 python3.6 pycharm 安装statsmodels Oracle 10进制转36进制 概念数据模型设计与逻辑数据模型设计、物理数据模型设计的关系 does not support ASP.NET compatibility 错误 Oracle日志文件管理与查看 oradmin相关用法 Oracle Standby Database 实现方案 c# 调用zebra打印指令 打印到USB端口 win2008 64位 + oracle11G 64位 IIS7.5 配置WEBSERVICE VISIO 2007 修改形状默认字体 自定义模具 c# 解决IIS写Excel的权限问题 EXTJS gridpanel 动态设置表头 vs2008 连接 vss2005 出现 analyze utility 错误的解决方法 WPF CANVAS 内形状的margin为负值时定位不正确的问题 韶关旅游攻略 IE8不能上网的问题 一些事件的评论
extjs 文件上传对话框显示后,页面出现空白的问题
白沙河 · 2012-06-11 · via 博客园 - 白沙河

extjs 文件上传对话框显示后,页面出现空白的,之前的写法是整个panel用Ext.form.panel,

修改为只有文件上传部分的控件用ext.form.panel包含,整个页面用Ext.panel.panel包含,

可以避免这个问题。


 1 Ext.define('MyApp.view.MyPanel', {
 2     extend: 'Ext.panel.Panel',
 3 
 4     height: 375,
 5     width: 557,
 6     layout: {
 7         type: 'border'
 8     },
 9     title: 'My Panel',
10 
11     initComponent: function() {
12         var me = this;
13 
14         Ext.applyIf(me, {
15             items: [
16                 {
17                     xtype: 'gridpanel',
18                     title: 'My Grid Panel',
19                     region: 'center',
20                     columns: [
21                         {
22                             xtype: 'gridcolumn',
23                             dataIndex: 'string',
24                             text: 'String'
25                         },
26                         {
27                             xtype: 'numbercolumn',
28                             dataIndex: 'number',
29                             text: 'Number'
30                         },
31                         {
32                             xtype: 'datecolumn',
33                             dataIndex: 'date',
34                             text: 'Date'
35                         },
36                         {
37                             xtype: 'booleancolumn',
38                             dataIndex: 'bool',
39                             text: 'Boolean'
40                         }
41                     ],
42                     viewConfig: {
43 
44                     }
45                 },
46                 {
47                     xtype: 'container',
48                     height: 110,
49                     layout: {
50                         type: 'border'
51                     },
52                     region: 'north',
53                     items: [
54                         {
55                             xtype: 'form',
56                             bodyPadding: 10,
57                             title: '',
58                             region: 'center',
59                             items: [
60                                 {
61                                     xtype: 'filefield',
62 id:'upfile',//需要通过ID,获得控件的form,在执行提交动作
63                                     width: 534,
64                                     fieldLabel: 'Label',
65                                     anchor: '100%'
66                                 },
67                                 {
68                                     xtype: 'button',
69                                     text: 'MyButton'
70                                 }
71                             ]
72                         }
73                     ]
74                 }
75             ]
76         });
77 
78         me.callParent(arguments);
79     }
80 
81 });

Ext.getCmp('upfile').getForm().submit({   
            waitTitle : '系统提示',
            waitMsg : '正在上传,请等待...',// 动作发生期间显示的文本信息
            url: 'Fileupload.aspx',//fileUploadServlet   
            method : 'POST',// 表单提交方式
            params : request,
            success: onSuccess,
            failure: onFailure
    });