This project is read-only.

Add ability to reinitialize binding for some containers


Add ability to reinitialize binding for some containers.
We use method 'addEventListener' but for now we have no ability to dispose binding, so we should add usage of 'removeEventListener'.
Nowadays web sites getting more and more dynamic so we need ability to:
1) initialize binding for some container
2) dispose bindings for some container
3) reinitialize binding for some container
Bad example of not having such a ability is MVC unobtrusive validation because we need make some dirty hacks to reinitialize validation rules for some container. In case of single page application we often reuse containers for new content.


wrote Aug 11, 2013 at 7:56 PM

This is an excellent idea.  The question is how would you do this and what would the syntax look like?  Remember that we can have multiple DOM elements bound to a single property on a Lava Object.  So how, without referencing the DOM elements explicitly, would you dispose bindings for them?  Or, are you simply talking about disposing all bindings for a single property on a Lava Object?  I think that we should come up with some good use cases for this before you implement it.

wrote Nov 28 at 8:14 AM