[CLOSED] Error with ResourcePlaceholder for scripts in MVC: Reference token (ext.net.initscriptfiles) was not found.

Page 2 of 2 FirstFirst 12
  1. #11
    Hi,

    Apologies for my delayed reply. I think your comments don't match your explanation further below?

    To me it seems that ResourceMode.Script will include the Ext.NET initialization script straight after the core Ext.NET scripts, and your subsequent scripts and other things in the head tag will follow.

    With ResourceMode.ScriptFiles, it seems that the Ext.NET initialization script will be added to the end of the head so that your own scripts and other tags in the head section can be added before that (but after the Ext.NET initialization scripts).

    If that is right, then I'd suggest something like this, maybe?

    public enum ResourceMode
    {
        /// <summary>
        /// Renders the Ext.NET and ExtJS CSS styles.
        /// </summary>
        Style,
     
        /// <summary>
        /// Renders the Ext.NET and ExtJS JavaScript files and the Ext.NET initialization script together
        /// </summary>
        Script,
      
        /// <summary>
        /// Renders the Ext.NET and ExtJS JavaScript files but renders the Ext.NET initialization script at the end of the head tag, allowing you to insert your own html (such as your own script) in between
        /// </summary>
        ScriptFiles
    }
    I think I got that the right way round...? :)


    Thanks,
    Anup
  2. #12
    but renders the Ext.NET initialization script at the end of the head tag
    It is a bit incorrect technically. The "ScriptFiles" mode doesn't do that. It is done by default. I mean that the initialization script is rendered at the end of the head tag by default even without using a ResourcePlaceHolder.

    But, anyway, your comments is much more valuable for developers. Thank you! Though, I would like to extend/correct a bit.

    What do you think about this version?

    public enum ResourceMode
    {
        /// <summary>
        /// Renders the Ext.NET CSS resources in the place where the ResourcePlaceHolder is defined.
        /// </summary>
        Style,
    
        /// <summary>
        /// Renders the Ext.NET JavaScript resources and the Ext.NET initialization script together in the place where the ResourcePlaceHolder is defined.
        /// </summary>
        Script,
    
        /// <summary>
        /// Renders the Ext.NET JavaScript resources in the place where the ResourcePlaceHolder is defined. But the Ext.NET initialization script is rendered at the end of the head tag as by default, allowing you to insert your own HTML (such as your own JavaScript) in between.
        /// </summary>
        ScriptFiles
    }
  3. #13
    Thanks for clarification. Update looks great.

    Thanks!
  4. #14
    Committed to the trunk.

    Thank you, Anup!
Page 2 of 2 FirstFirst 12

Similar Threads

  1. [CLOSED] Token is not unique error for nested grid
    By alscg in forum 2.x Legacy Premium Help
    Replies: 4
    Last Post: Nov 01, 2013, 4:53 AM
  2. [CLOSED] Reference token (ext.net.initscriptfiles) was not found.
    By jesperhp in forum 2.x Legacy Premium Help
    Replies: 14
    Last Post: Oct 08, 2013, 10:24 AM
  3. Replies: 5
    Last Post: Jun 11, 2013, 7:46 AM
  4. Replies: 5
    Last Post: Nov 12, 2012, 7:41 AM
  5. Replies: 4
    Last Post: Mar 30, 2012, 7:30 PM

Tags for this Thread

Posting Permissions