View Full Version : using viewready event of dataview to modify dom

15 May 2014, 2:13 PM

I'm using the viewready event of the dataview in order to:

* add click handlers for some checkboxes I rendered
* modify some values (checked states, css) that were not included in the store used to render the checkboxes

I debug the code and I saw that I was correctly modifying the values and attaching the click handlers. But as soon as I finished debugging my modification were cleared...

Do you know what happened or which event I should use instead of viewready?

Thanks in advance :)

19 May 2014, 8:23 AM
First thing I'd say is you don't have to add click handlers the way you are doing. You can use something like:

listeners : {
element : 'el',
delegate : 'input',
click : function(e, t) {}


view.mon(view.getEl(), {
delegate : 'input',
click : function(e, t) {}