Message from JavaScript discussions

November 2016

— 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

Message permanent page

— 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);
});
}

Message permanent page

— 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.

Message permanent page

— Basically I need to figure out a way to tell the view it needs to render, regardless of the diff check result

Message permanent page

— And if you look at the componentUpdate interface, it does indeed have a force argument, so the functionality to make it render is there, just not the mechanism to detect when we need to use it

Message permanent page

— I see, how do you load views? what's your mechanism to do that?

— Load the view objects themselves?

— How do you trigger this