关于修改表单界面的form数据回显问题[急]:checkbox radio combo
commanderhyk
2008-07-25
如题
对于常规表单通过 form中加入 reader: new Ext.data.JsonReader( {root:'data'}, [{name: 'textarea',mapping:'textarea',type:'string'}, {name: 'mydate',mapping:'mydate',type:'string'}, {name: 'combo1',mapping:'combo1',type:'string'} ] ) 事件中加入 form.getForm().load( { url : 'post.jsp?task=2', waitMsg : '正在载入数据...', success : function(_form,action) { Ext.MessageBox.alert('编辑', '载入成功!'); }, failure : function(_form,action) { Ext.MessageBox.alert('编辑', '载入失败'); } }); 就可以正常的表单反填. 那么对于combo checkbox radio这些种类的控件如何反填值的选中状态? 谢谢 |
|
mercuryzhang
2008-07-25
期待...
以前的人好象说只有用setValue() |
|
guhe10
2009-12-03
<%@ page language="java" import="java.util.*" isELIgnored="false" pageEncoding="utf-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>初始版本</title> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> <meta http-equiv="description" content="this is my page"> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath }/js/resources/css/ext-all.css" /> <script type="text/javascript" src="${pageContext.request.contextPath }/js/adapter/ext/ext-base.js"></script> <script type="text/javascript" src="${pageContext.request.contextPath }/js/ext-all.js"></script> <script type="text/javascript"> Ext.onReady(function(){ Ext.QuickTips.init(); // turn on validation errors beside the field globally Ext.form.Field.prototype.msgTarget = 'side'; var fs = new Ext.FormPanel({ frame: true, title: 'jsomn Form', labelAlign: 'right', labelWidth: 85, width: 340, waitMsgTarget: true, renderTo:'formdiv', // configure how to read the json Data reader: new Ext.data.JsonReader( {root:'data'}, [{name: 'first',mapping:'first',type:'int'}, {name: 'last',mapping:'last',type:'int'}, {name: 'company',mapping:'company',type:'int'}, {name: 'add',mapping:'add',type:'string'} ] ), items: [new Ext.form.FieldSet({ title: 'Contact Information', autoHeight: true, defaultType: 'textfield', items: [{ fieldLabel: 'First Name', name: 'first', width: 190 }, { fieldLabel: 'Last Name', name: 'last', width: 190 }, { fieldLabel: 'Company', name: 'company', width: 190 },{ //columnWidth:.5,// 宽度为50% xtype:"checkbox", boxLabel:"添加角色",// 显示在复选框右边的文字 name:"add" // anchor:'90%' }] })] }); fs.render('form-ct'); fs.form.load({ url: 'userGroupManage.htm?method=userGroup_RoleSet', method: 'GET', waitMsg: 'Loading' }); }); </script> </head> <body> <div id='formdiv' style="width: 100%;height:100%"></div> </body> </html> |
相关讨论
相关资源推荐
- delphi 安装控件时提示系统找不到指定的模块的解决
- Delphi 10.3 安装TM Scripter控件包出现关于提示can‘t load package ‘xxx.bpl.‘ 错误问题的简单解决方法
- Delphi7 提示can‘t load package *.bpl 错误问题的解决方法
- Delphi7 打开工程报错 '找不到指定的模块'&'EOIesysError'
- 关于提示can't load package 'xxx.bpl.' 错误问题的解决方法
- 微信小程序订阅消息推送
- 小程序获取服务器的表单信息,小程序通过模版消息获取拿不到formid了,需通过订阅消息...
- 小程序统一服务消息_微信小程序:订阅消息推送
- 微信小程序获取formId时提示"the formId is a mock one"
- delphi中package的使用心得