Hello Guys,
I have a problem. I'm not able to do the work on extjs 4 in my asp.net mvc application 4.
Simply nothing happens when I run my application, ie a blank page appears. By Firebug I found the following error:
See the structure of my application in the attached file:
app_folder.png
My main application app.js
Code:
Ext.Loader.setConfig({
enabled: true,
disableCaching: true,
paths: {
'Ext': '../Scripts/ext411/src',
//'Ext.ux':'../Scripts/ext411/src/ux',
'APP': '../app'
}
});
Ext.BLANK_IMAGE_URL = "../Scripts/ext411/resources/themes/images/default/tree/s.gif";
Ext.application({
name: 'APP',
appFolder: '../app',
controllers: [
'Menu'
,'Custom'
,'Bank'
,'Person'
],
autoCreateViewport: true
});
BundleConfig.cs
Code:
using System.Web.Optimization;
namespace Business.App_Start
{
public class BundleConfig
{
// For more information on Bundling, visit http://go.microsoft.com/fwlink/?LinkId=254725
public static void RegisterBundles(BundleCollection bundles)
{
bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
"~/Scripts/jquery-{version}.js"));
bundles.Add(new ScriptBundle("~/bundles/jqueryui").Include(
"~/Scripts/jquery-ui-{version}.js"));
bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
"~/Scripts/jquery.unobtrusive*",
"~/Scripts/jquery.validate*"));
// Use the development version of Modernizr to develop with and learn from. Then, when you're
// ready for production, use the build tool at http://modernizr.com to pick only the tests you need.
bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
"~/Scripts/modernizr-*"));
bundles.Add(new StyleBundle("~/Content/css").Include("~/Content/site.css", "~/Content/hti_styletoolbars.css"));
bundles.Add(new StyleBundle("~/Content/themes/base/css").Include(
"~/Content/themes/base/jquery.ui.core.css",
"~/Content/themes/base/jquery.ui.resizable.css",
"~/Content/themes/base/jquery.ui.selectable.css",
"~/Content/themes/base/jquery.ui.accordion.css",
"~/Content/themes/base/jquery.ui.autocomplete.css",
"~/Content/themes/base/jquery.ui.button.css",
"~/Content/themes/base/jquery.ui.dialog.css",
"~/Content/themes/base/jquery.ui.slider.css",
"~/Content/themes/base/jquery.ui.tabs.css",
"~/Content/themes/base/jquery.ui.datepicker.css",
"~/Content/themes/base/jquery.ui.progressbar.css",
"~/Content/themes/base/jquery.ui.theme.css"));
// Bundles Extjs
bundles.Add(new StyleBundle("~/Content/extjs411").Include("~/Scripts/ext411/resources/css/ext-all.css"));
bundles.Add(new StyleBundle("~/Content/extjs411/ux/css").Include("~/Scripts/ext411/src/ux/alert.css"));
bundles.Add(new ScriptBundle("~/bundles/extjs411").Include("~/Scripts/ext411/ext.js"));
bundles.Add(new ScriptBundle("~/bundles/extjs411/locale").Include("~/Scripts/ext411/locale/ext-lang-pt_BR.js"));
bundles.Add(new ScriptBundle("~/bundles/aplicacao").Include("~/app/app.js"));
}
}
}
_Layout.cshtml
Code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>@ViewBag.Title - My ASP.NET MVC Application</title>
<link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />
<meta name="viewport" content="width=device-width" />
@Styles.Render("~/Content/css")
@Scripts.Render("~/bundles/modernizr")
</head>
<body>
<header>
<div class="content-wrapper">
<div class="float-left">
<p class="site-title">@Html.ActionLink("your logo here", "Index", "Home")</p>
</div>
<div class="float-right">
<section id="login">
@Html.Partial("_LoginPartial")
</section>
<nav>
<ul id="menu">
<li>@Html.ActionLink("Home", "Index", "Home")</li>
<li>@Html.ActionLink("About", "About", "Home")</li>
<li>@Html.ActionLink("Financial", "Index", "MenuPrincipal")</li>
<li>@Html.ActionLink("Contact", "Contact", "Home")</li>
</ul>
</nav>
</div>
</div>
</header>
<div id="body">
@RenderSection("featured", required: false)
<section class="content-wrapper main-content clear-fix">
@RenderBody()
</section>
</div>
<footer>
<div class="content-wrapper">
<div class="float-left">
<p>© @DateTime.Now.Year - My ASP.NET MVC Application</p>
</div>
</div>
</footer>
@Scripts.Render("~/bundles/jquery")
@RenderSection("scripts", required: false)
</body>
</html>
My Index.cshtml MenuPrincipal
Code:
@{
ViewBag.Title = "Business";
Layout = null;
}
<head>
<title>Business</title>
</head>
@Styles.Render("~/Content/css")
@Styles.Render("~/Content/extjs411")
@Styles.Render("~/Content/extjs411/ux/css")
@Scripts.Render("~/bundles/extjs411")
@Scripts.Render("~/bundles/extjs411/pkgs")
@Scripts.Render("~/bundles/extjs411/locale")
@Scripts.Render("~/bundles/aplicacao")
Please, any help will be appreciated
hugs