Tagged Questions
0
votes
0answers
21 views
Backbone model fires “change” event twice
I just started working on backbonejs about a week ago and i discovered that my model is being saved twice on listening to calling "change" event from my view .
Basically what i have is a table which ...
0
votes
0answers
18 views
Missing hash in Backbone JS URL
I have a Backbone JS problem with routing. I have two routes set up. One which is simply called test, which is triggered by a click event in a view. The handler for the event simply triggers a ...
0
votes
2answers
27 views
Backbone.js - Uncaught TypeError: Object [object Object] has no method 'apply'
I am new to Backbone.js. For experimenting / initial development, I had everything on one page in the tag, but I started separating out the code into a separate .js file. After I did that I get an ...
3
votes
0answers
40 views
Backbone load a view within a view (as partial)
Hope someone can help me with,
I have a Backbone view, that is basically a skeleton of HTML, the HTML builds a tabbed interface, each tab obviously has a link and content area. What I am wanting to ...
1
vote
3answers
45 views
How to instantiate an object literal
I'm trying to understand the fundamentals of object literals
window.Test = ({
attribute1:'This is',
attribute2:'a test',
function1: function(){
alert(this.attribute1 + ' ' + ...
0
votes
0answers
32 views
Backbone doesn't forget previous model
I'm trying to create a page where I can see list of my items, and edit them when clicked (on a separate page).
But when I browse trough different items (models), and then try to edit one item, every ...
0
votes
1answer
25 views
Underscore template throwing error when loading via ajax
I am using underscore to convert JSON data into a template:
$(document).ready(function(){
var template = $("#furniture-template").html();
$furnitureList = _.template(template, {things: ...
2
votes
2answers
27 views
Does backbone sort all elements in collection or just added ones
I'm having a speed issue on my Backbone app during the endless scrolling event; models are added to a collection individually, and so the collection is sorted every time. I'm wondering how I can ...
3
votes
2answers
36 views
How can I fetch data asynchronously in backbone using backbone layout manager?
I'm having a problem in Layout Manager to get the view to wait to render until a bunch of AJAX calls have completed and successfully populated a collection which I pass to subviews.
Here's my ...
2
votes
3answers
59 views
Newly saved Backbone model does not appear in collection after fetch
I am using backbone local storage and experiencing some weird behavior.
I have a Model and Collection that is defined, instantiated, and fetched:
MyModel = Backbone.Model.extend({
...
1
vote
3answers
45 views
Backbone.js refresh view with a timer?
I have a collection populated from a URL:
var PeopleCollection = Backbone.Collection.extend({
model: Person,
url: '/hr/xml-home-3a.php'
});
Which uses the following view:
var PeopleView = ...
0
votes
2answers
36 views
How to handle nested jquery deferred calls
I have a function to get some data, and the function should return a promise. In the function, I have to made 2 requests - one after another. I ended up with a nested deferrer call where the last call ...
0
votes
1answer
19 views
Cannot access validateError string after isValid() call
I am trying to implement a backbone model validate function, I am following the api here:
http://backbonejs.org/#Model-isValid
var newModel = new Model({ item: this.$('#itemValue').val() });
if ...
1
vote
1answer
37 views
Backbone.js DOM isn't ready in render method to apply jquery magic
I'm trying to build a todo list with multiple lists. Everything works perfectly fine. The issue comes when I want to use JQuery UI Sortable.
I'm adding the snippet in my TaskListView in the render ...
0
votes
3answers
22 views
How to pass a args from a jQuery defered
I have a Backbone model that fetch some data, process the data and then a function should get the processed data.
$.when(model.fetch())
.done(function(){
return model.processData()
})
...