| Page 1 of 1 | [ 2 posts ] |
|
I am using Y.View with Y.Handlebars to render a ModelList...
when a small amount of renderable data in that view (say a 'total' figure in one of the Models in the ModelList) were to change, I am looking for the best way to code this. Would I need to call render on the whole view (which iterates over the template for each Model in the ModelList), or can I have some sort of subviews or nested view? I know I can target the DOM, but I am wondering if I can continue the approach in this view / template model. I was looking at Partials in handlebars but I don't think they provide any solution to this scenario?? Any guidance would be appreciated. Thanks. |
|
If your models are fairly simple, then I'd stick with one view which represents the whole list. Here's an example of how to set this up:
http://jsfiddle.net/ericf/suqCq/ If your models are complex, then you may want to go the route of having a view for each model nested in parent view that represents the list. I hope that helps get you started. |
| Page 1 of 1 | [ 2 posts ] |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info
Powered by phpBB® Forum Software © phpBB Group