View Full Version : [CLOSED] Component rendered before initialization scripts using placeholder with ResourceMode.Script with MVC

Nov 20, 2013, 9:06 AM
The following seems to only be an issue with MVC when using ResourceMode.Script. I am finding that the Statusbar component has its initialization script written to the head before the rest of the Ext.NET initialization scripts, resulting in JavaScript errors (Ext is not defined, because Statusbar JS is using it before the Ext.NET initialization scripts have loaded).

I spent ages trying to reproduce this in a cut down example (thinking Viewport had something to do with it!) but Daniil was able to provide the simplest case of all!

var X = Html.X();

<!DOCTYPE html>
<title>ResourcePlaceHolder ResourceMode.Script test</title>




If you change ResourceMode to ResourceMode.ScriptFiles, then it is okay.
We have found this to be the case for Statusbar, I am not sure if others are affected (most others I have tried seem fine)
This could be related to this thread, but I am not sure: http://forums.ext.net/showthread.php?27271-Error-with-ResourcePlaceholder-for-scripts-in-MVC-Reference-token-%28ext-net-initscriptfiles%29-was-not-found

Nov 20, 2013, 9:48 AM

Thanks for the report. Fixed in SVN

Nov 20, 2013, 5:49 PM
Many thanks for the quick turnaround. Works nicely now.