Hey,
the form-widgets in 1.0 are very cool! One i missed: events for valid / invalid. I have tried a dialog which has to resize for the actual size. With the new feature in alpha3 to show invalid messages under the field, my dialog has to resize after it is invalid or valid. I think a event will be cool, like this (simply put at the end of clearInvalid() and markInvalid() in Ext.form.Field). Maybe it will be a good idea to give a config flag so the field doesnt loose their focus if its invalid.
the form-widgets in 1.0 are very cool! One i missed: events for valid / invalid. I have tried a dialog which has to resize for the actual size. With the new feature in alpha3 to show invalid messages under the field, my dialog has to resize after it is invalid or valid. I think a event will be cool, like this (simply put at the end of clearInvalid() and markInvalid() in Ext.form.Field). Maybe it will be a good idea to give a config flag so the field doesnt loose their focus if its invalid.

|
#2
|
|
Slightly OT, but I don't like the display of error messages under the fields! It throws out page layout.
The error display method should be configurable. eg, a config option: errorMethod: myfunc // Message is passed to the function called in scope of the field widget ![]() |
|
#3
| |
|
Quote:
![]() |
|
#4
|
|
invalid/valid events could fire very often but I agree, they need to be there. I will add them in.
Animal, the msgTarget is extremely configurable. The supported values 'qtip', 'title', 'under' or 'any element id'. The other option is to override the markInvalid/clearInvalid methods (which would be the function you're describing). new Ext.form.TextField({
allowBlank: false,
markInvalid : function(msg){
// do something
},
clearInvalid : function(){
// do something
}
});
![]() |
本文讨论了ExtJS 1.0版本中表单组件的功能改进,特别是关于有效性和无效性的事件支持。作者提出了增加事件的想法,并探讨了错误消息显示的可配置性,包括自定义显示方式和实现字段验证总结等功能。

被折叠的 条评论
为什么被折叠?



