Quantcast
Channel: JavaScriptMVC Forum
Browsing all 3491 articles
Browse latest View live

Re : Init Method on each Element

I created a version that is annotated with explanations and fixes. Here's a short-form version of the weird stuff in this code:1) new only returns a single instance, so only one Control is created and...

View Article


Re : $.Model.static.convert() used with $.Model.prototype.restore()...

bump

View Article


Is there an established pattern for JMVC fixtures and their use with tests?

JMVC 3.2.4Hello all,TL;DR - Should tests be shared between app code and tests?I'm currently test-driving with QUnit alongside legacy code but I'm struggling with existing fixtures being used to...

View Article

Re : canJS model finds return "Constructor" to success callback instead of...

Hello Everyone,I am learning CanJS .I too encountering the same problem as discussed here. My fixture method returns constructors. I downloaded can.custom.js just a few weeks ago. Is this issue still...

View Article

funcunit, funcunit/run not found when running test from terminal

Hi, I am new to javascriptmvc and I am running the tutorial at http://javascriptmvc.com/docs.html#!FuncUnit . I am trying to run the example test from the terminal:./js funcunit/run selenium...

View Article


javascriptmvc 3.2.4 can't update?

I am getting this error when I try to update any of the components. (I've downloaded jmvc 3.2.4 and unzipped it to  a folder on my fedora 18 box):[ariskk@localhost javascriptmvc]$ ./js funcunit/update...

View Article

Re : ajax call to database example

So, if I code my recipe.js file as follows, is that ok?steal('jquery/model', function(){/** * @class Cookbook.Models.Recipe * @parent index * @inherits jQuery.Model * Wraps backend recipe services....

View Article

Re : ajax call to database example

Almost...You need to return the Deferred that $.ajax gives you. Not sure what the d property of the response Deferred is meant to be in your code.While technically right, there are a few things you may...

View Article


Re : ajax call to database example

I have to use POST for Asp.Net.  I have to send in my own json for params.I can get this to run as far as my server code.But the recipes don't appear on the page.findAll: function(paramz, success,...

View Article


Re : ajax call to database example

Without seeing your app, it's hard to tell what the problem is.Is your server returning JSON data (verify this in the network tab of your dev tools)If it's returning data, is it an Array of objects?If...

View Article

Re : ajax call to database example

The file I was editing was.../cookbook/models/recipe.jsThe page I was using was.../cookbook/recipe/list/views/list.htmlI thought recipe.js was the correct place to put the ajax call for findAll.  Does...

View Article

Update several model instances at once

Hello,I started to use canjs framework several weeks ago. I have a situation when I need to update several model instances in one request (more specifically in one transaction) instead of multiple...

View Article

Re : Update several model instances at once

I have implemented it in the past as a method on can.Model.List.  Say you wanted to be able to update a list of recipes:Recipe = can.Model({  findAll: "/recipes"},{})Recipe.List = can.Model.List({...

View Article


Re : ajax call to database example

It looks like you are trying to log out the return from GetDataFromServer() in a synchronous fashion - the console log should be inside a done() callback chained onto the end of GetDataFromServer() as...

View Article

Re : ajax call to database example

If my model looks like the standard model recipe.js below and I modify findAll to look like the findAll to look like the findAll below (from...

View Article


Re : Events in controller

If the element that your controller is instantiated on is removed from the DOM then all event listeners on that instance will be destroyed. It doesn't sound like that is happening though because you...

View Article

Re : ajax call to database example

That should work.What do you mean by name and description?

View Article


Re : Bitovi is Hiring and We Want You!

Hello Curtis,I will be emigrating to North America this October. Are you still looking to hire?

View Article

Re : $.Model.static.convert() used with $.Model.prototype.restore()...

FYIThe solution to this is simple: always serialize your attributes when using $.Model.static.convert() (using $.Model.static.serialize()) !Although not explicitly stated in the documentation you must...

View Article

Re : javascriptmvc 3.2.4 can't update?

I've experienced the same problem recently. Didn't find a solution.

View Article
Browsing all 3491 articles
Browse latest View live