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

Re : converting retrieved models

Found out myself:Using can.Model.modelcan.Model.modelsinstead of this._superdoes what it is expected to do.Is there a special way or necessity to load a pugin this._super?

View Article


Re : converting retrieved models

Yes, with CanJS there's a plugin that handles _super.  You will also need to steal 'can/construct/super'

View Article


Observable listener in can.Construct

Hi there,I have a can.Contruct that I use as a super class, everything is fine except for the observable listener is not firing:'{productsObservable} product': function () {    this.activate();},The...

View Article

Re : Observable listener in can.Construct

You want to use can.Control for declarative event bindings, not can.Construct. If it's early enough in your development, consider trying can.Component which leads to less boilerplate and more...

View Article

Correct replacing of list attribute while Model data update

The fiddle shows the problemhttp://jsfiddle.net/prinzC/6A7PW/1/On init we have ```users``` list containing 3 items. We use standard findOne to get new data from server that contains new list, and we...

View Article


Re : converting retrieved models

I see, thanks for the hint

View Article

Re : converting retrieved models

It seems that model/models are deprecated use parseModel/parseModels if appropriate. 

View Article

Re : Correct replacing of list attribute while Model data update

What do you think about define plugin API that would allow to define a strategy for attributes merging? For example something like that: var Todo = can.Model.extend({     define: {        users: {...

View Article


Create several docs which are side by side and independent from each other?

I start using DocumentJS which for some reason I did not use before. Ist it possible, to create more than one doc? What I want: I want to create a developers-doc similar to the doc of JMVC / canjs etc....

View Article


Re : Create several docs which are side by side and independent from each other?

well, thinking about it sometimes work. load('steal/rhino/rhino.js'); steal("documentjs", function(DocumentJS){     DocumentJS('myapp', {         out: 'myapp/docdev',         markdown : [ //...

View Article

findOne based on route

Hi, I've just with CanJS so this is probably a simple questiong. I haven an API that has these paths and responses: /api/:owner/:repo [{commit: '4asd56f4asd56f4asd65f', message: 'Commit message 1'},...

View Article

Re : converting retrieved models

NB: The version of CanJS included in JSMVC 3.3 (1.1.7) hasn't deprecated model/models.

View Article

Re : Correct replacing of list attribute while Model data update

I think what you're showing here is related to https://github.com/bitovi/canjs/issues/829 and I'd appreciate some +1s on it, because I think it's important to fix, especially in light of it breaking...

View Article


Re : Correct replacing of list attribute while Model data update

air_hadoken Yes the issue is related. I believe the behaviour is expected, but it may lead to inconsistency when used unaware. Allowing to define a merging strategy for a particular attribute would...

View Article

How to send empty array field with can.ajax

I understand that can.ajax is a wrapper for jQuery.ajax, so the question is not refereed to can.js directly. But as I want to update the model data it uses can.ajax to communicated the server. So...

View Article


Re : How to send empty array field with can.ajax

I think I've run into the same problem, which is a limitation of the default encoding used `application/x-www-form-urlencoded`. If you send data encoded as `application/json` you will be able to send...

View Article

Re : findOne based on route

I think you might find a similar example in http://canjs.com/guides/Components.html under the Events heading. Your commits component should have a scope variable `commit`. Your mustache template will...

View Article


Re : Correct replacing of list attribute while Model data update

I've run into this problem, too. The workaround I found was to use a can.compute() which allows you to replace the list completely. It means you must access the attribute differently (object.users()...

View Article

Re : How to send empty array field with can.ajax

Thanks I belive it will work. I think this situation could be handle by can.js model layer as it is oriented on sending json data and this problem should be common.

View Article

Re : findOne based on route

Thanks for the fast reply. Ok instead of trying to get the data inside the app state's define for the commit, I'm listening on the route change in the Commits component. This works when clicking on a...

View Article
Browsing all 3491 articles
Browse latest View live