Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

Re : Cascaded dropdowns/models

$
0
0
Hey @robregonm, findAll() returns a deferred so what you are doing there isn't going to work as expected. There is a nice trick I think you might like. If you initiate a model list with {} it will go to the server and retrieve the items and fill in your list. So it just becomes:

  1. var myList = new myModel.List({});

myList will be empty at first but will be populated after the server responds. Live-binding makes it all just work.

Viewing all articles
Browse latest Browse all 3491

Trending Articles