Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Jsviews relies on structure? #29

blowsie opened this Issue Jan 17, 2012 · 2 comments


None yet
2 participants

blowsie commented Jan 17, 2012

Ive built some custom helpers and some templates to pivot tables
This requires me to open the table tag, check proceeding rows to see if they belong to they table and add them , when the next proceeding row does now match, close the table.

This works fine and beautifully with jsrender, no errors, nice clean code.

However when I use jsview's data-getfrom="[dataName]" type tag it falls over.
The error in console is - "template is undefined" - template = template.split( "=" ) - line 236..

To ensure that the problem is the tags not being closed, i used the same helpers and removed all the table stuff and just wrapped the data with <div></div>. This works as expected

However if I was to wrap the data with only the starting <div> tag, it breaks..
What is the reason for this, does jsviews check or rely on the structure of the fields parent html elements?

I hope my message is clear and understandable.


BorisMoore commented Jan 23, 2012

JsViews adds annotations (HTML comment tags) and stores linking metadata in parent elements. So if you link and then modify the DOM through code and then relink again you may cause the the annotations or metadata to be out of sync, and break JsViews. It is the old problem that if part of the DOM is declaratively data-driven, you may not be able simultaneously to drive the same DOM content through independent programmatic code. (Servant of two masters :)). When we get JsViews to beta, we should see whether this problem remains for you...


BorisMoore commented Apr 9, 2013

This should work correctly in current code. Closing for now. Please let me know (reopen) if you still have the same issue with the latest version.

@BorisMoore BorisMoore closed this Apr 9, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment