ardiantoro
23 Nov 2011, 8:57 PM
Hi all,
I'm new to ExtJs4 and having a problem when I'm learning the MVC Architecture. I must use VS2010 because my company required it.
I just want to make a controller,
here's my code
This is the index.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Account Manager</title>
<link href="/extjs/resources/css/ext-all.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/extjs/ext-all-debug.js"></script>
<script type="text/javascript" src="/app/app.js"></script>
</head>
<body>
</body>
</html>
This is the app.js
Ext.application({
name: 'AM',
appFolder: 'app',
controllers: ['Users']
});
This is the controller, Users.js
Ext.define("AM.controller.Users", {
extend: 'Ext.app.Controller',
init: function () {
console.log('Initialized Users! This happens before the Application launch function is called');
}
});
When I start the program, it always produce an error
Microsoft JScript runtime error: Ext.Loader is not enabled, so dependencies cannot be resolved dynamically. Missing required class: AM.controller.Users
I want to understand the MVC concept, just declare the controller and see what's happening
I'm new to ExtJs4 and having a problem when I'm learning the MVC Architecture. I must use VS2010 because my company required it.
I just want to make a controller,
here's my code
This is the index.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Account Manager</title>
<link href="/extjs/resources/css/ext-all.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/extjs/ext-all-debug.js"></script>
<script type="text/javascript" src="/app/app.js"></script>
</head>
<body>
</body>
</html>
This is the app.js
Ext.application({
name: 'AM',
appFolder: 'app',
controllers: ['Users']
});
This is the controller, Users.js
Ext.define("AM.controller.Users", {
extend: 'Ext.app.Controller',
init: function () {
console.log('Initialized Users! This happens before the Application launch function is called');
}
});
When I start the program, it always produce an error
Microsoft JScript runtime error: Ext.Loader is not enabled, so dependencies cannot be resolved dynamically. Missing required class: AM.controller.Users
I want to understand the MVC concept, just declare the controller and see what's happening