- 浏览: 1131371 次
- 性别:
- 来自: 北京
文章分类
- 全部博客 (411)
- Java Foundation (41)
- AI/机器学习/数据挖掘/模式识别/自然语言处理/信息检索 (2)
- 云计算/NoSQL/数据分析 (11)
- Linux (13)
- Open Source (12)
- J2EE (52)
- Data Structures (4)
- other (10)
- Dev Error (41)
- Ajax/JS/JSP/HTML5 (47)
- Oracle (68)
- FLEX (19)
- Tools (19)
- 设计模式 (4)
- Database (12)
- SQL Server (9)
- 例子程序 (4)
- mysql (2)
- Web Services (4)
- 面试 (8)
- 嵌入式/移动开发 (18)
- 软件工程/UML (15)
- C/C++ (7)
- 架构Architecture/分布式Distributed (1)
最新评论
-
a535114641:
LZ你好, 用了这个方法后子页面里的JS方法就全不能用了呀
页面局部刷新的两种方式:form+iframe 和 ajax -
di1984HIT:
学习了,真不错,做个记号啊
Machine Learning -
赵师傅临死前:
我一台老机器,myeclipse9 + FB3.5 可以正常使 ...
myeclipse 10 安装 flash builder 4.6 -
Wu_Jiang:
触发时间在将来的某个时间 但是第一次触发的时间超出了失效时间, ...
Based on configured schedule, the given trigger will never fire. -
cylove007:
找了好久,顶你
Editable Select 可编辑select
Data Access and Interconnectivity / Validating Data:
http://livedocs.adobe.com/flex/3/html/help.html?content=validators_2.html
上面的摘录说的很清楚:flex validator为我们提供了一种不需要调用服务器端,只在flex client端的验证方式。
但在验证体系中,是否还有调用服务器端的必要那?答案是有的!比如说做添加操作时,某业务主键的是否重复验证,最好就是在点击提交按钮后,调用服务器端,验证所输入的业务主键值是否重复,而不应该使用之前取过的这样一个业务主键list。这样的验证该怎么办那?只能通过扩展flex validator,使其支持远程方法调用来做了:
Showing errors for backend validations:
http://www.actionscript.org/forums/showthread.php3?t=173275
Handle client and server validation with Flex 3?
http://stackoverflow.com/questions/5897917/handle-client-and-server-validation-with-flex-3
custom validator against remote object:
http://stackoverflow.com/questions/3979592/custom-validator-against-remote-object
flex : creating custom validators:
http://flexscript.wordpress.com/2008/09/22/flex-creating-custom-validators/
Using Flex 4 / Enhancing usability / Validating Data -> Using validators:
http://help.adobe.com/en_US/Flex/4.0/UsingSDK/WS2db454920e96a9e51e63e3d11c0bf60efb-7fdd.html
Validating data by using custom validators:
http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf68c0f-7ffb.html
Example: Validating multiple fields:
http://livedocs.adobe.com/flex/3/html/help.html?content=createvalidators_4.html#184524
Flex 3 Custom validation of grouped input fields:
http://flexmaster.blog.co.in/2010/06/16/flex-drag-and-drop-the-definitive-tutorial/
通过Validator的validateAll方法对页面所有验证在点击提交按钮时做集中验证:
Validating Flex forms using the Validator classes:
http://blog.flexexamples.com/2007/08/13/validating-flex-forms-using-the-validator-classes/
Using the Validators.validateAll() method to validate a form:
http://blog.flexexamples.com/2007/08/02/using-the-validatorsvalidateall-method-to-validate-a-form/
Working with validation events:
http://livedocs.adobe.com/flex/3/html/help.html?content=validators_6.html
文件上传验证validator例子:
http://www.adobe.com/devnet/flex/articles/custom_validator.html
是否相等validator例子:
http://blowingthroughlines.com/2009/02/18/uncategorized/flex-custom-validator-email-confirmation/
http://livedocs.adobe.com/flex/3/html/help.html?content=validators_2.html
引用
In typical client-server environments, data validation occurs on the server after data is submitted to it from the client. One advantage of using Flex validators is that they execute on the client, which lets you validate input data before transmitting it to the server. By using Flex validators, you eliminate the need to transmit data to and receive error messages back from the server, which improves the overall responsiveness of your application.
Note: Flex validators do not eliminate the need to perform data validation on the server, but provide a mechanism for improving performance by performing some data validation on the client.
Note: Flex validators do not eliminate the need to perform data validation on the server, but provide a mechanism for improving performance by performing some data validation on the client.
上面的摘录说的很清楚:flex validator为我们提供了一种不需要调用服务器端,只在flex client端的验证方式。
但在验证体系中,是否还有调用服务器端的必要那?答案是有的!比如说做添加操作时,某业务主键的是否重复验证,最好就是在点击提交按钮后,调用服务器端,验证所输入的业务主键值是否重复,而不应该使用之前取过的这样一个业务主键list。这样的验证该怎么办那?只能通过扩展flex validator,使其支持远程方法调用来做了:
Showing errors for backend validations:
http://www.actionscript.org/forums/showthread.php3?t=173275
Handle client and server validation with Flex 3?
http://stackoverflow.com/questions/5897917/handle-client-and-server-validation-with-flex-3
custom validator against remote object:
http://stackoverflow.com/questions/3979592/custom-validator-against-remote-object
flex : creating custom validators:
http://flexscript.wordpress.com/2008/09/22/flex-creating-custom-validators/
引用
All standard validators components inherits from the base of mx.Validators.Validator class. To create a custom validator need to work with extending the Validator class. The creation of custom validator includes following steps;
A) Create a class which extends mx.Validators.Validator.
B) Class must override doValidation() method.
C) Overridden doValidation() method should accept a parameter of type Object.
D) Overridden doValidation() method should return an Array.
If the validation of a condition against given object doesn’t succeed, then doValidation() method returns an array containing objects of ValidationResult. If doValidation() method does succeed then method returns an empty array.
A) Create a class which extends mx.Validators.Validator.
B) Class must override doValidation() method.
C) Overridden doValidation() method should accept a parameter of type Object.
D) Overridden doValidation() method should return an Array.
If the validation of a condition against given object doesn’t succeed, then doValidation() method returns an array containing objects of ValidationResult. If doValidation() method does succeed then method returns an empty array.
Using Flex 4 / Enhancing usability / Validating Data -> Using validators:
http://help.adobe.com/en_US/Flex/4.0/UsingSDK/WS2db454920e96a9e51e63e3d11c0bf60efb-7fdd.html
引用
trigger Specifies the component generating the event that triggers the validator. If omitted, by default Flex uses the value of the source property.
triggerEvent Specifies the event that triggers the validation. If omitted, Flex uses the valueCommit event. Flex dispatches the valueCommit event whenever the value of a control changes. Usually this is when the user removes focus from the component, or when a property value is changed programmatically. If you want a validator to ignore all events, set triggerEvent to an empty string (""). For information on specific validator classes, see Using standard validators.
triggerEvent Specifies the event that triggers the validation. If omitted, Flex uses the valueCommit event. Flex dispatches the valueCommit event whenever the value of a control changes. Usually this is when the user removes focus from the component, or when a property value is changed programmatically. If you want a validator to ignore all events, set triggerEvent to an empty string (""). For information on specific validator classes, see Using standard validators.
Validating data by using custom validators:
http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf68c0f-7ffb.html
引用
About overriding the doValidation() method
Your custom validator class must contain an override of the protected Validator.doValidation() method that takes a single argument, value, of type Object, and returns an Array of ValidationResult objects. You return one ValidationResult object for each field that the validator examines and that fails the validation. For fields that pass the validation, you omit the ValidationResult object.
You do not have to create a ValidationResult object for fields that validate successfully. Flex creates those ValidationResult objects for you.
The base Validator class implements the logic to handle required fields by using the required property. When set to true, this property specifies that a missing or empty value in a user-interface control causes a validation error. To disable this verification, set this property to false.
In the doValidation() method of your validator class, you typically call the base class’s doValidation() method to perform the verification for a required field. If the user did not enter a value, the base class issues a validation error stating that the field is required.
The remainder of the doValidation() method contains your custom validation logic.
Your custom validator class must contain an override of the protected Validator.doValidation() method that takes a single argument, value, of type Object, and returns an Array of ValidationResult objects. You return one ValidationResult object for each field that the validator examines and that fails the validation. For fields that pass the validation, you omit the ValidationResult object.
You do not have to create a ValidationResult object for fields that validate successfully. Flex creates those ValidationResult objects for you.
The base Validator class implements the logic to handle required fields by using the required property. When set to true, this property specifies that a missing or empty value in a user-interface control causes a validation error. To disable this verification, set this property to false.
In the doValidation() method of your validator class, you typically call the base class’s doValidation() method to perform the verification for a required field. If the user did not enter a value, the base class issues a validation error stating that the field is required.
The remainder of the doValidation() method contains your custom validation logic.
Example: Validating multiple fields:
http://livedocs.adobe.com/flex/3/html/help.html?content=createvalidators_4.html#184524
Flex 3 Custom validation of grouped input fields:
http://flexmaster.blog.co.in/2010/06/16/flex-drag-and-drop-the-definitive-tutorial/
通过Validator的validateAll方法对页面所有验证在点击提交按钮时做集中验证:
Validating Flex forms using the Validator classes:
http://blog.flexexamples.com/2007/08/13/validating-flex-forms-using-the-validator-classes/
Using the Validators.validateAll() method to validate a form:
http://blog.flexexamples.com/2007/08/02/using-the-validatorsvalidateall-method-to-validate-a-form/
Working with validation events:
http://livedocs.adobe.com/flex/3/html/help.html?content=validators_6.html
引用
<?xml version="1.0"?> <!-- validators\ValEventListener.mxml --> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"> <mx:Script> <![CDATA[ // Import event class import mx.events.ValidationResultEvent; private function handleValid(event:ValidationResultEvent):void { if(event.type==ValidationResultEvent.VALID) submitButton.enabled = true; else submitButton.enabled = false; } // Submit form is everything is valid. private function submitForm():void { // Handle submit. } ]]> </mx:Script> <mx:ZipCodeValidator source="{inputZip}" property="text" valid="handleValid(event);" invalid="handleValid(event);"/> <mx:TextInput id="inputZip"/> <mx:TextInput id="inputPn"/> <mx:Button id="submitButton" label="Submit" enabled="false" click="submitForm();"/> </mx:Application>
文件上传验证validator例子:
http://www.adobe.com/devnet/flex/articles/custom_validator.html
是否相等validator例子:
http://blowingthroughlines.com/2009/02/18/uncategorized/flex-custom-validator-email-confirmation/
发表评论
-
myeclipse 10 安装 flash builder 4.6
2011-12-11 12:47 15386从Flash Builder 4 之后,ado ... -
FLEX:Nested Object & Nested Data Grid
2011-08-15 18:14 2109Flex Nested Object & Nested ... -
FLEX 服务器端交互: remoteObject & AsyncToken & 数据定时刷新 & Timer
2011-06-21 18:47 2747动态调用RemoteObject: Dynamically i ... -
FLEX : Tree & contextMenu & Array's filter & ArrayCollection's filterFunction
2011-05-29 16:05 1900Using Flex 4.5 / Using data-dri ... -
FLEX : ObjectProxy & <fx:Model> tag
2011-05-28 21:37 1980今天碰到了一个非常让我困扰的问题,使我觉得很有必要对Objec ... -
Flex:Application&Variable Scope(this owner parent parentApp parentDoc outerDoc)
2011-05-28 17:18 1391关键字: this owner parent parentA ... -
Flex : Performance tuning 性能调优
2011-05-28 14:50 1673附件: Flex Application Performanc ... -
FLEX example 例子
2011-05-28 12:12 3177How to find an ArrayCollection ... -
FLEX : Event 事件
2011-05-24 19:51 1685ActionScript 3.0 Developer’s Gu ... -
FLEX:Data Binding 数据绑定
2011-05-24 14:44 3598务须精读的文章: Flex data binding pitf ... -
FLEX Component 组件 汇总
2011-05-23 13:56 2275Combox默认将对象中名为label的属性作为显示用的lab ... -
FLEX : dragEnabled & dropEnabled
2011-05-22 17:38 1682通过设置dragEnabled属性为true,可以使这些控件作 ... -
FLEX Data type 数据类型
2011-05-22 09:21 2054Programming ActionScript 3.0 / ... -
FLEX ERROR WARNING 总结
2011-05-22 08:13 3189常会碰到的错误:TypeError: Error #1009: ... -
Flex: labelFunction versus ItemRenderer
2011-05-22 07:16 3252When to Use labelFunction versu ... -
Flex Application 初始化顺序
2011-05-22 06:15 1623http://blog.csdn.net/chengyong ... -
Flex Metadata 元数据:Bindable(注意首字母大写),etc
2011-05-22 06:08 1751Adobe® Flex™ 3.2 语言参考 -> 元数据 ... -
FLEX笔记
2009-04-15 10:29 2311Adobe Flex 4 官方资料库: http://help ...
相关推荐
这个 Perl 模块允许您根据 W3C XML Schema 验证 XML 文档。 该模块没有实现完整的 W3C XML Schema 建议,而是一个有用的子集。
Validator万能验证架框api Validator万能验证
Struts Validator验证器使用指南 <br>验证器: 从0.5版,验证器在一些form中就已经实现了,他最初包含在开发人员包中,后来核心代码挪到Jakarta Commons包中和Struts特别扩展中作为 Struts 1.1的一部分。...
BootstrapValidator验证表单插件BootstrapValidator验证表单插件BootstrapValidator验证表单插件BootstrapValidator验证表单插件BootstrapValidator验证表单插件BootstrapValidator验证表单插件BootstrapValidator...
validator验证原代码
Focuslight :: Validator 根据定义的规则验证http请求参数(或其他参数),而无需模型。 概要: require 'focuslight-validator' result = Focuslight :: Validator . validate ( params , { :request_param_key_...
Validator验证框架 回顾ActionForm的表单验证,掌握Validator验证框架.zip
spring_validator验证 基业spring mvc3.0注解验证
BootstrapValidator - 从下一个 v0.6.0 版本开始,该插件支持多种框架(Bootstrap、Foundation、Semantic UI、UIKit)。 它将重命名为FormValidation 。 升级指南将在 v0.6.0 发布时提供。 - 用于验证表单字段的...
提供: 表单的验证 基本流程 和处理方法 小小例子
ssh2 jQuery Validator验证重复添加
hibernate-validator 5.3.5.Final jar包 ;desc:if you want validator your project
:stage , :description , :companiesend 要验证 Contact 类的对象,请定义一个验证器: class ContactValidator include AttrValidator :: Validator validates :first_name , presence : true , length : { min : ...
插件描述:Validator是一个jQuery验证插件,可以验证文本,文本区,密码复选框并选择元素。验证器支持:需要依赖复选框,最小/最大长度、电子邮件、数量、数字和一些定位的错误消息
bootstrapvalidator 表单验证bootstrapvalidator 表单验证bootstrapvalidator 表单验证bootstrapvalidator 表单验证
validator验证多个Name表单,自己看看代码就会的了
包含在我们平时编程中常用正则表达式如:日期正则表达式,使用RegularExpressionValidator验证控件时的验证功能及其验证表达式,从URL地址中提取文件名的javascript程序等
Struts Validator验证框架详细讲解.txt
表单验证控件commons-validator-1.3.1表单验证控件commons-validator-1.3.1表单验证控件commons-validator-1.3.1表单验证控件commons-validator-1.3.1表单验证控件commons-validator-1.3.1表单验证控件commons-...