Ext.js5表单—验证vtype扩展(时间段以及密码确认)(50)
来源:互联网 发布:整容软件app 编辑:程序博客网 时间:2024/06/06 18:33
view
/** * Advanced validation examples using VTypes * 对于Vtypes验证例子的扩展 */Ext.define('KitchenSink.view.form.AdvancedVTypes', { extend: 'Ext.container.Container', xtype: 'form-advtypes', controller: 'form-advtypes', //貌似之前写margin:x x x x没有放在对象中, //对于margin-bottom单个的可能需要用style对象引入 defaults: { style: { 'margin-bottom': '20px' } }, width: 500, items: [{ xtype: 'box', // same as 'component'貌似插入html文本的时候xtype都写的是component,不知道为什么20151222 html: [ '<p>The first example shows two date fields acting as a date range. ', 'Selecting an initial date sets the minimum value for the end field. ', 'Selecting an ending date sets a maximum value for the start field.</p>' //第一个例子展示的是时间段 ] }, { xtype: 'form', title: 'Date Range', frame: true, bodyPadding: '5 5 0', style: { 'margin-bottom': '40px' }, fieldDefaults: { msgTarget: 'side', autoFitErrors: false }, layout: 'form', defaultType: 'datefield', items: [{ fieldLabel: 'Start Date', name: 'startdt', itemId: 'startdt', vtype: 'daterange', endDateField: 'enddt' // id of the end date field引入结束时间的id }, { fieldLabel: 'End Date', name: 'enddt', itemId: 'enddt', vtype: 'daterange', startDateField: 'startdt' // id of the start date field引入开始时间的id }] }, { xtype: 'box', html: [ '<p>This second example shows a password verification, the second value must be equivalent', 'to the first to validate.</p>' //第二个例子展示密码验证,其中第二次输入的密码必须和第一次输入的密码一样 ] }, { xtype: 'form', frame: true, title: 'Password Verification', bodyPadding: '5 5 0', layout: 'form', fieldDefaults: { msgTarget: 'side', autoFitErrors: false }, defaults: { inputType: 'password' }, defaultType: 'textfield', items: [{ fieldLabel: 'Password', name: 'pass', itemId: 'pass', allowBlank: false, listeners: { validitychange: 'validateField', blur: 'validateField' } }, { fieldLabel: 'Confirm Password', name: 'pass-cfrm', vtype: 'password', initialPassField: 'pass' // id of the initial password field }] }]});
viewcontroller
Ext.define('KitchenSink.view.form.AdvancedVTypesController', { extend: 'Ext.app.ViewController', alias: 'controller.form-advtypes', validateField: function(field) { //这个next还不太清楚是继承哪一个类,用的什么样的方法。 //粗略估计可能是Ext.draw.modifier.Modifier类下面的next的方法 //解释:Next modifier that receives the pop-up changes. field.next().validate(); }});
0 0
- Ext.js5表单—验证vtype扩展(时间段以及密码确认)(50)
- 使用ext的Vtype密码验证错误
- Ext确认密码验证
- 表单验证(使用Vtype)
- Ext.js5(表单)的容器(表单load测试数据)(表单填写的数据的保存)(vtype)(combineErrors)(插入())(文本框的布局)(36)
- Ext.js5表单—登录表单(40)
- Ext.js5表单—注册表单(42)
- Ext.js5表单文本—数字(24)
- Ext.js5表单—即时查询(结合Ext.Template和远程数据)(52)
- Ext.js5表单—购物车付款表(表单绑值copy)( listConfig)(43)
- Ext.js5表单—(在mousedown的时候就进行验证)(并且显示错误信息的时候样式会自动变化)hbox的布局(47)
- Ext.js5表单—(自定义错误信息)(formBind)(53)
- Ext.js5表单,表格—(等级,评级)小部件(45)
- Ext.js5表单文本—标签文本(33)
- Ext.js5表单—请联系我们(41)
- Ext.js5表单的文件上传(toast)(30)
- Ext.js5小鲱鱼域(表单域)(39)
- Ext.js5的表格的排序扩展(7)
- repo sync 遇到问题
- IOS 之 GCD线程 心得总结
- vs2005中在对话框中添加浏览网页控件及使用
- c++异常处理机制
- UGUI 之 判断鼠标或者手指是否点击在UI上
- Ext.js5表单—验证vtype扩展(时间段以及密码确认)(50)
- 关于TextView的跑马灯滚动方式
- Odoo的安装
- 学习资源
- 将MongoDB导出成csv文件
- 使用Jsoup 抓取页面的数据
- 几种功能电路的BIT测试方案设
- 分析国家统计局行政区划代码(省市区数据)生成SQL
- 浙江理工2015.12校赛-B 七龙珠