Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7530321
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T04:52:47+00:00 2026-05-30T04:52:47+00:00

I have very simple backbone model and collection. I have a corresponding backbone.marionette.CollectionView and

  • 0

I have very simple backbone model and collection. I have a corresponding backbone.marionette.CollectionView and backbone.marionette.ItemView and they live in a backbone.marionette.region.

The ItemView template contains a “remove” button. The click event of the remove button issues a model.destroy(). A HTTP DELETE is issued to the backend, but it appears to be issued twice and because the second time it fails, the item is not removed from the collection.

Everything else is working fine, just the HTTP DELETE being issued twice. Any idea why?

I’m using Backbone.Marionette version v0.4.5

# Model:
class User extends Backbone.Model
  idAttribute: "_id"

# Collection
class Users extends Backbone.Collection
  model: app.User 
  url: "/someUrl/Users"

# CollectionView 
class UserListView extends Backbone.Marionette.CollectionView
  tagName: "ul",
  itemView: app.UserItemView

# ItemView
class UserItemView extends Backbone.Marionette.ItemView
  template: "#item"
  tagName: "li"

  events:
    "click .edit": "edit"
    "click .remove": "remove"

  remove: ->
    @model.destroy()

  edit: (e) ->
    alert JSON.stringify @model
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T04:52:48+00:00Added an answer on May 30, 2026 at 4:52 am

    mhmm…. it really seems something related to some built in event or method.

    Try to use non standard names for events and methods.

    For instance you could try to rename the remove method in ‘myRename’ (remove is a pre-defined backbone method in views and collections).

    like this:

     # ItemView
     class UserItemView extends Backbone.Marionette.ItemView
       template: "#item"
       tagName: "li"
    
       events:
         "click .edit": "edit"
         "click .remove": "myRemove"
    
       myRemove: ->
         @model.destroy()
    
       edit: (e) ->
         alert JSON.stringify @model
    

    hope this helps

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this very simple jQuery function: $(.milestone-in-tree).live({ mouseenter: function() { setTimeout( $.ajax({ type:
New to using Backbone and have a very simple application. Basically there are Clients
I have very simple script for submitting the form. This is html template: <table>
i have very simple problem. I need to create model, that represent element of
I am in the process of learning backbone.js and have written some very simple
I have very simple data model like this: create table Company ( id int
I have a very simple Backbone.JS app developed, for learning CoffeeScript + Backbone.JS: class
I have a very basic backbone (sample) application which just creates and destroys model
I have very simple piece of code. The goal is when i input four-digit
I have very simple OpenGL ES example similar to Hehe's example : http://nehe.gamedev.net/tutorial/ios_lesson_02__first_triangle/50001/ As

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.