Validation for Coolite Controls
One thing I have always found lacking with Coolite ASP.NET server
controls was integration with the validation framework of ASP.NET, that
prevents submission of a form if any control state is invalid according
the the Validators associated with that control.
No doubt, the ExtJs
client controls that Coolite server controls translate to provide good
& extensible client-side validation, but that does not perform the
form from being submitted unless you have put your controls inside a
FormPanel, & manually check for validation when the FormPanel is
submitted.
I created a CooliteValidator class, that inherits from
the ASP.NET BaseValidator class. You just drop the Vaidator on the form, and
associate it to a Coolite control (CooliteValidator throws an exception
if you try to associate it to a non-Coolite TextFieldBase control).
More details on the control are available on my blog post:
http://www.rahulsingla.com/blog/cool...rol-validation
The code for the control can be downloaded from the link below the post. The direct link is below:
http://www.rahulsingla.com/sites/def...ionControl.zip
It would be interesting to see what the Coolite team thinks about my control. I would request them to have a look at it. If they find it suitable, I would be willing to turn it over for inclusion in the Coolite toolkit with absolutely no strings attached.
RE: Validation for Coolite Controls
Hi r_honey,
Thanks for making the validation control, and the blog post! I'm certain others will find this very helpful.
I agree... the server-side Validation control support needs some attention. This has been a big TODO item on my list for a while but we've just found it difficult to find the time to devote to solving the problem.
I'll read through your blog post and code in detail and let you know if I/we have any suggestions.
RE: Validation for Coolite Controls
Sure, I would be all ears for any suggestions!!!
A reply to the following thread:
http://forums.ext.net/showthread.php?5710
would help me improve this control.
RE: Validation for Coolite Controls
geoff, there was a minor error in the Control code, which prevented it from working properly on FF. I have removed it. Please update the Code from the link above, if you have already downloaded it.
RE: Validation for Coolite Controls
Hi geoff, as you said, any suggestions???