Unplanned
Last Updated: 12 Apr 2021 10:40 by ADMIN
mgs
Created on: 11 Mar 2013 11:14
Category: MVVM
Type: Feature Request
62
Apply Modell Settings to the HTML View on kendo.bind
Suppose a model is defined with settings for editable, required, validation, etc. Then this model is used a datasource's schema.

Instances of the datasource's data will be models. However, if a model is bound to some HTML view, it's settings are not applied to the view. All settings have to be manually applied to the HTML elements.

I suggest that these settings are applied automatically. Then for example, a field's property like "required" wouldn't have to be coded at two different places.
2 comments
Jack
Posted on: 24 Sep 2014 15:29
IMO, this is more than an interesting idea. A decent framework should not implement business rules (validation rules) in the presentation layer (HTML). Moreover,a decent framework should not force you to duplicate validation rules in Javascript (models) and in HTML (input tags). This is a major design flaw in Kendo UI validation framework.

I can understand why you would want to keep validation rules on HTML input elements for quick and dirty proofs of concept, but models are the way to go in an MVVM framework. A form widget could easily populate validation rules from models to HTML elements as suggested above. Also see https://github.com/kendo-labs/kendo-ui-forms (although not yet implemented).
ADMIN
Brandon
Posted on: 26 Apr 2013 14:06
Interesting idea, Michael, thanks for the suggestion. I wonder if this might make for a nice addition to our Plugins project over at the Kendo UI Labs (https://github.com/kendo-labs/kendo-plugins) What do you think? Is this something you'd be willing & able to work with us on?