BorisMoore/jsviews — Issue #39: If data-to applied elements have additional logic for validation/value-check underlying model is not updated
Author: athalay
Created: 2012-02-16 14:34:08+00:00
State: open

Dear All,

I have the following example:

```

```

jStepper is a 'plugin' which allows minvalue and maxvalue definitions for textboxes. These textboxes in this example have data-from and data-to attriutes pointing to the same property of a RepetitionItem.

After the jStepper code is executed, and I change values in the textbox, the jstepper code runs properly, but the underlying model is not updated (spans after the textbox listen to the model).

What is the best-practice for this scenario?

Also, doing the "if(view.parent.path == "$data.RepetitionItems")" statement in the event handler seems hacky, what happens if I have more complex templates, is there an easier way to accomplish this?

Or shall I put the {{each}}-content into different template, and then I can somehow hook for its onAfterCreate event?

Thanks!