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

  • Home
  • SEARCH
  • 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 8591373
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T23:30:49+00:00 2026-06-11T23:30:49+00:00

I have a Marionette.CompositeView which needs to render a collection. I would like to

  • 0

I have a Marionette.CompositeView which needs to render a collection.
I would like to filter this collection on fetch and add action.
I tried with the following code (1) but I get the following error (2).

Any ideas, thanks.


(1)

var myCompositeView = Marionette.CompositeView.extend({

    initialize: function () {
        this.collection = app.taskCollection.where({type: 'todo'});
    }

});

(2)

// Uncaught TypeError: Object  has no method 'on'
  • 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-06-11T23:30:51+00:00Added an answer on June 11, 2026 at 11:30 pm

    Marionette’s CompositeView and CollectionView both expect the collection setting to be a valid Backbone.Collection. The where method on Backbone’s collection does not return a Backbone.Collection, it return an array. So you have to wrap a collection around the results:

    
    initialize: function(){
      var filtered = app.taskCollection.where({type: 'todo'});
      this.collection = new Backbone.Collection(filtered);
    }
    

    Of course you can use any type that extends from Backbone.Collection. I just wanted to illustrate the point of it being a collection with this example.

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

Sidebar

Related Questions

I have a Marionette.CollectionView which renders a list of ItemView s. During render() ,
I have a collection which is rendered by a Backbone Marionette item view. The
have written this little class, which generates a UUID every time an object of
Have a procedure which looks like Procedure TestProc(TVar1, TVar2 : variant); Begin TVar1 :=
I have very simple backbone model and collection. I have a corresponding backbone.marionette.CollectionView and
have a php code like this,going to convert it in to C#. function isValid($n){
The setting I have Backbone.Marionette.ItemView which renders some content. When the content is rendered
I have this code in Coffeescript window.App = new Backbone.Marionette.Application Models: {} Collections: {}
Have you managed to get Aptana Studio debugging to work? I tried following this,
Have you ever tried working with a XAML file which contains thousand tons of

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.