3.2.0

data model and input boxes

is there anything wrong with tying a control's data model state to an runtime HTML control like that:

My.Controls.IndexInput = My.System.Control.subclass();
   My.Controls.IndexInput.create = function() {
      var obj = this.prototype;

      obj.setTag("span");
      obj.defineTemplate("myInput", new Active.HTML.INPUT);
      obj.defineTemplate("verifyBtn", new Active.HTML.BUTTON);

      obj.defineModel("validator");
      obj.defineValidatorProperty("value", function() {var el = this.getTemplate("myInput").element(); return el?el.value:""});
      [...]


Thanks
Dmitry
December 24,

This topic is archived.

See also:


Back to support forum