Nov 10, 2009, 2:34 AM
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.
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.