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

Re : Best way to share data between controllers?

Thanks for the helpful and speedy replies. It's great to know I've settled on a tool with great community support!

View Article


Re : Control cannot listen to scroll event ?

No, controls follow the pattern of delegating events. In the case of browser events, they would need to bubble up the DOM tree. If controls started listening to events on each child, it would defeat...

View Article


Re : Control cannot listen to scroll event ?

So a scroll event cannot be listened to by :'.scroller scroll': function(el,ev) {}It can only be treated by 'scroll': function(el, ev) {}as long as the controller's view is the scroller itself.Is it...

View Article

Re : Best way to share data between controllers?

You've got the right forum dude. Lots of smart people on here. And the Bitovi crew are top notch.

View Article

Re : Odd binding issue with view + helper + Observe.List

I'm not sure on the reason for that either. Perhaps one of the Bitovi guys can chime in here.

View Article


Re : How to return a value from Controller methods

Guys any update on this problem. Please let us know if we need to do some changes in controller itself to fix this issue

View Article

How to return a value from Controller methods

I have this:Copy code$.Controller.extend("TestController",        /* @static */        {            defaults: {                 }        },        /* @prototype */        {...

View Article

Re : Automatic conversion for methods in static part of model

Sorry for not answering that long after those great responses. I imagined it would take me longer than a few minutes.I think I was not clear in my first point. I'll try to improve that:Alex...

View Article


Re : Converting response on create

So I got around the bug that prevents CanJS 1.1.3 Mootools from working and revisited this code. Overriding model does not work for create or update, only findone and findall.Should I file a bug for this?

View Article


Re : How to return a value from Controller methods

The convention for jQuery plugin methods is to always return the element they've been called on. If you want the return value from a controller use this:$('#test').controller().returnValue()

View Article

Re : Control cannot listen to scroll event ?

Correct. Realize this is not a misunderstanding of can.Control or $.Controller, but event delegation. $.delegate or $.on works the same way.DeveloperBitovi

View Article

Re : How to return a value from Controller methods

Thanks for your reply. Actually I have a widget controller with a "val" method. It works just fine if I do:$("#myelement").controller().val()  // returns the expected valueBut I'd prefer to...

View Article

Any hints of what is wrong?

Couldn't get any result returned with findAll(). Any hints? var CS = can.Model({ findAll : 'POST /api/list' },{}); var data = [ { id: 1, somename: 'ddd' }, { id: 2, somename: 'ddd' } ];...

View Article


Re : Any hints of what is wrong?

Here's your code (fixed) in a Fiddle.Few small things I had to fix:1) A findAll fixture just has to return an Array of objects. You were wrapping your Array in an extra Array2) s in your success...

View Article

Re : "$.each is not a function" inside an EJS template

Try can.$.each

View Article


Re : "$.each is not a function" inside an EJS template

Yes, it works this way. Thank you very much.But is there an explanation for this?

View Article

Re : How to return a value from Controller methods

You can do stuff like:var myControl = new myApp.Widgets.someController( "#domID" );myControl.someFunction( args );

View Article


Re : Destroy deleted models

Just in case anyone is interested, I have resorted to refreshing the parent object of whatever was deleted, but this is a brute force solution. Absent any answers here however this will have to do.

View Article

Loading class parent automatically

Hi all,I want to use the $.Class library together with StealJS.Is there a way to auto-steal the class's parent, based on a name/path convention? I would like to use the Zend naming convention.Thanks

View Article

Re : Loading class parent automatically

Use Steal and AMD. Use Can.js not previous versions of JMVC ($.Class). Steal parent class (file with parent class) in your child class file.

View Article
Browsing all 3491 articles
Browse latest View live