Questions tagged [backbone-events]

This is for backbone.js questions that specifically relate to Backbone's event handling system.

Docs

787 questions
-1
votes
2 answers

Binding events to views - Firing uneven number of times

I have UserModel: UserView and UserCollection: UserCollectionView. With this, I am trying to bind a click event to the UserView (I am doing this in UserView). So, this is the code I have: var root = 'http://localhost:5000/api/v1'; var app = {}; //…
Kevin
  • 6,539
  • 5
  • 44
  • 54
-1
votes
1 answer

Backbone.js trigger event blocks the subsequent statement

obj1.listen(obj2, 'save', function(t) { t.preventDefault() }) obj2 = { save: function save(a) { var saveOrNot = !1; this.trigger("save", { preventDefault: function() { saveOrNot = !0 } }); …
-1
votes
2 answers

Dom elements not updated when accessed inside backbone afterRender()

Here is my render() function: initialize: function() { this.selectDivView = new SelectView({ url: '/ir/secure/api/v40/myvariants/myVariantDBs', method: 'POST', template: myVariantDBFilterTemplate }); }, render:…
-1
votes
1 answer

Duplicate Username should not be allowed

I have created UI for users to create their own username and password. Username and passwords are stored in JSON format. Workflow: When user clicks on Register Button, user will be presented with UI screen with username and password input text…
-1
votes
1 answer

proxy is undefined error backboneJS

var my_variables = {}; _.extend(my_variables,Backbone.Events); my_variables.on("event_name",function(msg) { alert("easy street"+msg); }); proxy.on("all", function(eventName) { …
Gabriel ThaKid
  • 857
  • 3
  • 9
  • 19
-1
votes
1 answer

Is the event Hash in Backbone a form of pub-sub or is it another type of messaging mechanism?

The Event object is Backbone is clearly an implementation of pubSub ( http://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern ) but is the events Hash also? The events will be published regardless of who is receiving the msg, but since it is…
R Claven
  • 1,160
  • 2
  • 13
  • 27
-4
votes
1 answer

Backbone event behavior

I'm just getting started with backbone, and I have run into a very confusing wall. What I am doing: Create a model instance of type A that calls fetch during initialization. Create a model instance of type B that calls fetch during…
1 2 3
52
53