I have a Model 'User', but Bancha seems to be trying to get UserController->view instead of UsersController->view

We are using the standard ext and cake conventions. So the cake model name is singular, the controller name plural with "Controller" suffix.
In our example implementation we also have a user model, the model name is "User", the controller "UsersController", the ExtJS model name "User".
The error must be somewhere else.

Originally Posted by klander

Uncaught Ext.Error: Bancha: Tried to call User.read(...), but the server-side has not implemented UserController->view or index(...) ext-all-dev.js:8712

Ok, so here the error message is wrong, it should be in plural.. but the dispatcher is definitely looking for UsersController!

Originally Posted by klander

changing it from Bancha.onModelReady('User') to Bancha.onModelReady('Users') seems to make it go away.

bancha

Hi Ronald,

Thanks for the pointers!

So using the revised BanchaController.php, It gives me an "You're trying to decode an invalid JSON String:" when loading the page. So it does not load the grid panel. However, it appears to be receiving the JSON data as you can see here in my browser error log: http://pastebin.com/gRgMm59p

I dont seem to have a /bancha/bancha-api.js anywhere in my app. Could this be the problem?

:)

Hey!

So it works now

A minor thing is it tries to pull http://localhost/img/icons/delete.png even though ive set it to icon: '/bancha/img/icons/delete.png' in bancha/app/webroot/js/Bancha.js. I was not able to find this setting in any other file so i got around it temporarily by coping the /img/ directory to my DocumentRoot.