社区
JavaScript
帖子详情
Extjs中window隐藏后再打开fieldLabel显示多个
afei3418
2015-07-20 10:18:49
现在遇到一个这样的问题,window在hide之后,再打开,window页面中的fieldLabel显示多个
...全文
153
6
打赏
收藏
Extjs中window隐藏后再打开fieldLabel显示多个
现在遇到一个这样的问题,window在hide之后,再打开,window页面中的fieldLabel显示多个
复制链接
扫一扫
分享
转发到动态
举报
AI
作业
写回复
配置赞助广告
用AI写文章
6 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
afei3418
2015-07-20
打赏
举报
回复
每次都是通过fileWin.hide() 已经包含 fieldLabel : "<font color='red'>*</font>附件" 、fieldLabel: '备注'
香蕉猪
2015-07-20
打赏
举报
回复
不想看那么长的代码。。。 是不是 fieldLabel : "<font color='red'>*</font>附件",没有被楼主hide掉???楼主检查进行了Hide的div框的范围。。。。
xujun5031
2015-07-20
打赏
举报
回复
这个我以前也碰到过,好像 要清一下什么东西,时间太长,不记得了
afei3418
2015-07-20
打赏
举报
回复
相关代码如下: //文件panel fileFormPanel = new Ext.form.FormPanel({ name : "fileFormPanel", id : "fileFormPanel", labelWidth : 70, defaultType : "textfield", baseCls : 'x-plain', bodyStyle : 'padding:5px 5px 0', width : 390, buttonAlign:'center', fileUpload: true, //loadMask : false, //maskDisabled: true, loadMask : new Ext.LoadMask(Ext.getBody(), { msg : '请稍候,正在查询....' }), waitMsg : '请稍候,正在查询....', onSubmit: Ext.emptyFn, border : false, defaults : { width : 230 }, items : [ { name : "file", id : "uploadFile", inputType : 'file', fieldLabel : "<font color='red'>*</font>附件", style :"margin:4px", height : 20, allowBlank : false, blankText : "附件不能为空", emptyText : "请选择附件..." } ,{ name : 'fileRemark', id : 'fileRemark', xtype : 'textarea', fieldLabel: '备注', collapsible : true, style : 'margin:4px;margin-bottom:10px;', width : 230, height: 100 }], buttons : [{ name : 'fileSureBtn', id : 'fileSureBtn', text : "确定", handler : function(){ if (!fileWin.getComponent('fileFormPanel').form.isValid()) { selInfo("请完整填写表单!"); return; } //取消遮罩 //fileFormPanel.getEl().mask('请稍后,正在上传附件……'); //进度框 Ext.Msg.wait('请稍后,正在上传附件……', '', {animate : true}); //var fileName = $('fileName').value; // var uploadFile = $('uploadFile').value; // var remark = $('fileRemark').value; var uploadFile = fileFormPanel.getForm().findField("uploadFile").getValue(); var remark = fileFormPanel.getForm().findField("fileRemark").getValue(); //当前节点对象 var row =grid.getSelectionModel().getSelected();//获取一行 var fId = row.get('FolderId'); var dId = row.get('DocId'); var file = dwr.util.getValue("uploadFile"); //构造参数对象 var parObj = { docId : dId, folderId : fId, fileCode : '', //附件编码先不做(预留字段) fileName : fileName, //文件的名称 uploadFile : uploadFile, //上传的文件全路径 userId : userId, remark : remark }; //调用DWR方法 FolderHandlerBean.createFile(file,parObj,function(data){ if(data.flag == '1'){ //隐藏窗口 Ext.getCmp('uploadFile').setValue(''); fileWin.hide(); //刷新grid // fileStore.load({ // window.location.reload(); // selOk(data.msg); Ext.MessageBox.show({ title : '提示', msg : '添加成功!', modal : true, buttons : Ext.Msg.OK, icon : Ext.Msg.INFO, width : 200, fn : function() { fileGrid.getStore().reload(); } }); }else{ Ext.getCmp('uploadFile').setValue(''); fileWin.hide(); // fileWin.close(); window.location.reload(); selError(data.msg); } }); } }, { text : "取消", handler : function() { //清除数据 //Ext.getCmp('fileName').setValue(''); Ext.getCmp('uploadFile').setValue(''); Ext.getCmp('fileRemark').setValue(''); //隐藏窗口 fileWin.hide(); } }] }); //文件窗口 fileWin = new Ext.Window({ id : "fileWin", title : "附件编辑", width : 360, height : 450, bodyStyle : 'padding:5px;', maximizable : false, closeAction : 'hide', // closeAction : 'close', closable : true, //是否关闭 collapsible : true, //是否可以收缩 draggable : true, //是否可以拖拽 resizable : false, //是否可以调整大小 modal : true, //是否遮罩(true的时候,后面的页面不能使用) buttonAlign : "center", items : fileFormPanel });
afei3418
2015-07-20
打赏
举报
回复
如图所示:
afei3418
2015-07-20
打赏
举报
回复
问题已解决 ,改成xtype:'fileuploadfield'形式上传
extjs
3
window
窗口修改完退出提示是否保存
在
extjs
3
window
窗口
中
修改完数据退出,提示是否保存,未修改不提示直接退出 本程序在
extjs
3
中
测试可行
ExtJS
3.3版本的BUG
Window
测试窗体
ExtJS
3.3版本
中
Window
存在BUG,如下代码: Ext.onReady({ var _
window
= new Ext.
Window
({ title:"测试窗体", layout:"form", width:300, plain:true, items:{ xtype:"text
field
",
field
Label
:"姓名" }, buttons:[{ text:"确定", handler:function (){ alert(this.ownerCt.title); //alert(this.text); } }] }); _
window
.show(); }); 如果把以上代码直接放到html文档
中
运行,就会发现弹出的对话框
中
显示
this.ownerCt.title为“undefined”,而把ExtJ3.3换位其他的版本如换为ExtJ2.2以上代码不变,则代码就会正常运行,弹出的对话框
中
就会正常
显示
“测试窗体”,望看到本贴的同仁能测一下,看看是否真的存在BUG及如何修正。
找到的
ExtJS
实现多选下拉框3个代码
NULL 博文链接:https://lyndon-lin.iteye.com/blog/833120
extjs
与系统切分模块设计
extjs
与系统切分模块设计
extjs
与系统切分模块设计
extjs
与系统切分模块设计
Extjs
4.0一些常见入门学习范例带注释详解
Ext.onReady(function() { /** * 1.创建一个
window
窗体 */ Ext.define('MyApp.My
Window
', { extend : 'Ext.
Window
', title : 'welcome!', initComponent : function() { this.items = [{ xtype : 'text
field
', name : 'tfName',
field
Label
: 'Enter your name' }], this.callParent(arguments); } }); var win = Ext.create('MyApp.My
Window
'); win.show();
JavaScript
87,992
社区成员
224,698
社区内容
发帖
与我相关
我的任务
JavaScript
Web 开发 JavaScript
复制链接
扫一扫
分享
社区描述
Web 开发 JavaScript
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章