var jobs = new JobCollection(): jobs.fetch({success: function(collection, resp, opts){ console.log(collection.get('7a107f87-be69-5efa-107c-c045e75940cf'')); });
/** * Returns a collection of current search jobs. * * @param args Collection arguments that specify the number of entities to * return and how to sort them. See {@link CollectionArgs}. * @return A collection of search jobs. */ public JobCollection getJobs(Args args) { return new JobCollection(this, args); }
// Implement our collections, views, etc var jobCollection = new JobCollection(); var jobsView = new JobsView(); var filterView = new FilterView().render(); // Add listeners on our view filterView.on("submit", updateJobs); // Implement the functions for our view (this can be done in a number of ways) function updateJobs(query) { jobCollection.fetch({ data: { query: query } }).done(function(response) { // Technically you could just provide "jobsView.render" to the done() method, but I wanted to be a little more verbose here regarding parameters jobsView.render(response); }); }