Message from JavaScript discussions
November 2016
— javierbyte your check the code?
Https://github.com/escusado/nano-widget <- and manually call the methods of your childs when the data changes
— Hahaha god example
— Floofies please let me know if I understood your problem correctly - also, it would be useful to know how renderProcedure
is implemented, or some examples
— Yes exactly
— renderProcedure
is just a callback that gets executed by the views, it contains calls to jQuery-Template
and manipulates the DOM, then adds event listeners to the dispatcher
— When the important parts of the template are done loading (for instance containers for other views, or just the whole thing), resolve()
is used to alert the controllerview to move on to the next view
— So, a simple example would be this http://pastebin.com/6TLydass
— That callback is fed into the viewFactory
as the callback
argument
— And, then executed here
render: function (pageData) {
return new Promise (function (resolve, reject) {
renderProcedure(resolve, reject, pageData);
});
}
— And so... the issue is pretty simple. Lets say I load View A with Data 1234
. Then, I load View B, which overwrites all elements in the DOM. If I load View A again with 1234
, it will not render.
— Basically I need to figure out a way to tell the view it needs to render, regardless of the diff check result