Support Forum
I'm seeing an issue where a component I'm trying to load which contains a chart is giving me 404's because Ext.chart.legend.LegendBase is in the classic toolkit folder and not the charts src folder.
We don't load the full application instead we preload ext-all-debug and set the loadPath so we can only load in the files we need for the particular test. e.g.
loaderPath: {
'Ext.ux': '../../../ext/packages/ux/src',
'Ext.chart': '../../../ext/packages/charts/src/chart',
...
}
I'm assuming the loadPath config is what is causing this behaviour however without it we cannot load any chart stuff.
Am I missing something basic here?
We don't load the full application instead we preload ext-all-debug and set the loadPath so we can only load in the files we need for the particular test. e.g.
loaderPath: {
'Ext.ux': '../../../ext/packages/ux/src',
'Ext.chart': '../../../ext/packages/charts/src/chart',
...
}
I'm assuming the loadPath config is what is causing this behaviour however without it we cannot load any chart stuff.
Am I missing something basic here?
UX Developer ~ @damianpoole ~ [url=mailto://dpoole@financialforce.com]dpoole@financialforce.com[/url]
FinancialForce.com
FinancialForce.com
In our chart scheduler example we embed it with a static file like:
<script src="../../../extjs-6.5.0/build/packages/charts/classic/charts-debug.js" crossorigin="anonymous" type="text/javascript"></script>
For dynamic loading for ext ux packages in your application, I think you will find more information on the sencha forum.
<script src="../../../extjs-6.5.0/build/packages/charts/classic/charts-debug.js" crossorigin="anonymous" type="text/javascript"></script>
For dynamic loading for ext ux packages in your application, I think you will find more information on the sencha forum.
I'm using 6.2 there's no all file to achieve this with.
The issue is we are able to config the Ext.loader using the loaderPath config however I believe that bascially says to the loader, the charts package src directly is charts/src whereas in reality some of the code is within charts/classic/src therefore it cannot correctly load certain files.
With this in mind I don't see how your product works at all for dynamically loading only the required files for a required test using the loader, this is worked out using cmd which updates the bootstrap appropriate. I guess the solution would be to be more explict about the location of certain files to prevent 404's but I don't see this as a scalable/maintainable solution.
The issue is we are able to config the Ext.loader using the loaderPath config however I believe that bascially says to the loader, the charts package src directly is charts/src whereas in reality some of the code is within charts/classic/src therefore it cannot correctly load certain files.
With this in mind I don't see how your product works at all for dynamically loading only the required files for a required test using the loader, this is worked out using cmd which updates the bootstrap appropriate. I guess the solution would be to be more explict about the location of certain files to prevent 404's but I don't see this as a scalable/maintainable solution.
UX Developer ~ @damianpoole ~ [url=mailto://dpoole@financialforce.com]dpoole@financialforce.com[/url]
FinancialForce.com
FinancialForce.com
Let's be clear about this.
I guess you can find more information in this guide.
https://docs.sencha.com/extjs/6.2.0/gui ... rting.html
The Chart is not part of our product, it is an ExtJs package. If you require it correctly the files will be loaded.With this in mind I don't see how your product works at all for dynamically loading only the required files for a required test using the loader, this is worked out using cmd which updates the bootstrap appropriate.
I guess you can find more information in this guide.
https://docs.sencha.com/extjs/6.2.0/gui ... rting.html
I did in the end Nickolay, turned out the charts.js file was not in the build folder due to sencha cmd creates a workspace, it only copies across from the sdk location it believes you need e.g. slimed down build folder, no examples etc
I guess the point I was making though is still relevant, if I have an application and parts of it are split between modern and classic (a sencha example would be to load Ext.chart.legend.Legend, Ext.chart.legend.LegendBase is in either modern of classic and it's cmd that works that out), how would it be possible to dynamically load only the correct files for the given test. As of now configuring the loader is a one to one location, I appreciate that this is "not your product" however you are selling a product which is meant to tightly work with Sencha and this is just a flat out limitation
I guess the point I was making though is still relevant, if I have an application and parts of it are split between modern and classic (a sencha example would be to load Ext.chart.legend.Legend, Ext.chart.legend.LegendBase is in either modern of classic and it's cmd that works that out), how would it be possible to dynamically load only the correct files for the given test. As of now configuring the loader is a one to one location, I appreciate that this is "not your product" however you are selling a product which is meant to tightly work with Sencha and this is just a flat out limitation
UX Developer ~ @damianpoole ~ [url=mailto://dpoole@financialforce.com]dpoole@financialforce.com[/url]
FinancialForce.com
FinancialForce.com
Ok, can we narrow down the problem? Is it that "loaderPath" config should be dynamic, based on some condition?
The other way to solve this issue would be to load the main "index.html" file of the application, with certain flag in the URL, then checking for this flag during app initialization and stopping the launch if the flag is found. In this way, dynamic loader will be configured exactly the same way as it would be in the app. Details here: https://www.bryntum.com/blog/testing-an ... encha-cmd/
The other way to solve this issue would be to load the main "index.html" file of the application, with certain flag in the URL, then checking for this flag during app initialization and stopping the launch if the flag is found. In this way, dynamic loader will be configured exactly the same way as it would be in the app. Details here: https://www.bryntum.com/blog/testing-an ... encha-cmd/
Read the API documentation
I've have looked at that blog post as a possible solution so will investigate it more, maybe better if I provide you with an example setup over email so I can better explain what I "would like", if it's even at all possible.
UX Developer ~ @damianpoole ~ [url=mailto://dpoole@financialforce.com]dpoole@financialforce.com[/url]
FinancialForce.com
FinancialForce.com
If your setup does not contain confidential information we can just continue this thread. Otherwise my email - nickolay@bryntum.com
Read the API documentation