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

Re : Testing CanJS Web Apps

I just noticed that can/control/route wasn't part of canjs's core when stealing can.I just fixed that for people using steal:  https://github.com/bitovi/canjs/blob/master/can.jsIf the AMD build uses...

View Article



How to use findAll() error param? Or how to show login form when login...

I would like to know how can I return/handle errors such as login session expired and a call to can.Model.findAll() is made?Scenario:- user login session expired (20 minutes inactive for example)- user...

View Article

Re : [SOLVED] How to use findAll() error param? Or how to show login form...

You can just use the fail callback and examine the status code returned by the request. E.g.app.SecureModel  .findAll()  .done( function( list ) { /* do whatever with your list of models when request...

View Article

Re : [SOLVED] How to use findAll() error param? Or how to show login form...

Thank you! That should do for the authentication.Is there a way to access the data returned by the server A json response by any chance?

View Article

Re : Testing CanJS Web Apps

I think that is the problem. The can.js file didn't steal that plugin at all.For 1.1.3 you'll probably need to additionally require can/control/route in the control like this:define(["can",...

View Article


Re : [SOLVED] How to use findAll() error param? Or how to show login form...

.fail( function( xhr ) {  var obj;  try {    obj = can.parseJSON( xhr.responseText );  } catch ( err ) {    obj = {};  }})  That should do it, I think?(If this is not a one-off, then you'll want to use...

View Article

Re : Testing CanJS Web Apps

I just tried your fix and it worked. Thank you for your time guys.I was looking threw the source code of the framework and could not understand yet why the routing did not work when using AMD.I really...

View Article

Re : [SOLVED] How to use findAll() error param? Or how to show login form...

Thank you! Perfect!You are right, I`ll probably go the base model route to handle common responses from the server like when login session expires.

View Article


Best way to bind a templated event to object created by Control

Currently I have Control where I create some elements and add them to the DOM via the Control's init() method. They are not contained within the Control's element, so I don't believe normal scoped...

View Article


Permission denied to access property 'steal' - again or still?

We are using Selenium for testing JavaScriptMVC app and met "Permission denied to access property 'steal'" problem in Firefox 17..Looks like this problem appears if win.top.opener exists and (I'm not...

View Article

Re : Post or Send me an example with JavascriptMVC and PHP(CRUD) stuff

Hi, I prototype with Slim php micro-framework and I build application with Yii framework both of them plays nicely with can.Model, if your backend already built with cakephp you can check this post to...

View Article

Re : Best way to bind a templated event to object created by Control

I believe, you are using the only possible way do this. If created element doesn't belong to parent you should you use $ object and if it is the case you should call this.on() to bind events to options...

View Article

Re : Best way to bind a templated event to object created by Control

Ok thanks Alex. What exactly do you mean by the $ object?  I assume the $-wrapped dom element so that everything works as expected?Also, I am new to the framework, so not familiar with many use cases,...

View Article


Re : Question on can.route

Hi,Is it the same thing with AMD?Mohamed Cherif BOUCHELAGHEM

View Article

Re : Best way to bind a templated event to object created by Control

You may use selector based templated events only with nested elements if you want to handle events generated by "outside" element you need to use jquery-wrapped dom object, yes.Usually controls handle...

View Article


Re : Question on can.route

Yes. All the AMD build does is rewrite something like steal('a', 'b.js', function(A, B) {});todefine(['a/a', 'b'], function(A, B) {});And rename the module names accordingly (a/a.js becomes a.js). Same...

View Article

Re : Best way to bind a templated event to object created by Control

A bindEvents does make sense but basically would be the same thing as .on().What I suggest in your case is still binding to a selector instead of the actual button element:can.Control({ defaults : {...

View Article


Re : Permission denied to access property 'steal' - again or still?

We just had users report this in Firefox as well.  If a JMVC app is opened from a link with target="_blank", then the app gets this "Permission denied to access property 'stea'" exception.

View Article

Re : CanJS Web Service

I had the same problem.I want to separate front-end and back-end development. Make a JS MVC and REST reference CRUD implementation to demonstrate the concept. Find an accessible MVC framework for...

View Article

CanJS CRUD example with a RESTful API backend - think-a-doo.net

I just started using CanJS and I love it!When I started I looked for a reference CRUD app to see how others go about doing it with CanJS.Diving into CanJS really helped -...

View Article
Browsing all 3491 articles
Browse latest View live


Latest Images