Note that there are some explanatory texts on larger screens.

plurals
  1. POHow do you include a UX class in the MVC pattern?
    text
    copied!<p>Before the MVC pattern I would include UX classes simply by including this at the top of the JS, before <code>Ext.onReady</code>:</p> <pre><code>Ext.Loader.setConfig({enabled: true}); Ext.Loader.setPath('Ext.ux', 'extjs/examples/ux'); Ext.require([ 'Ext.ux.grid.FiltersFeature' ]); </code></pre> <p>Now I am working with the MVC pattern and I have a gridpanel that needs to use this same feature. I've included a requires statement in the view like this:</p> <pre><code>Ext.define('ST.view.StudentLog', { extend: 'Ext.grid.Panel', alias: 'widget.studentlog', requires: [ 'Ext.ux.grid.FiltersFeature' ], </code></pre> <p>But the app produces a 404 error when it first starts loading with this.</p> <p>Any ideas?</p> <p><strong>EDIT:</strong></p> <p>I've tried putting this same block of code at the top of the view also to no avail (referring to the <code>Ext.Loader.setConfig / .setPath</code> block). </p> <p>The loader keeps trying to load UX classes from <code>extjs/src/ux/</code> no matter how I try to tell it otherwise. According to <a href="https://stackoverflow.com/questions/8601094/changing-extjs-4-default-mvc-folder-structure">this suggestion</a>, I've also tried defining a path property in my app controller but it seems like whatever the answerer saw in the source back then doesn't exist in 4.1 rc3 because I can't find it and it doesn't work.</p> <p>If I just add the FilterFeature.js as an imported source file in my HTML with <code>&lt;script&gt;</code> tags then all of it's dependencies get 404 errors when my app starts.</p> <p>There must be a simple way of including UX classes in an app straight from the UX folder so that it can link to other UX dependencies.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload