[CLOSED] [1.0] Forcing all ext net scripts to load

  1. #1

    [CLOSED] [1.0] Forcing all ext net scripts to load

    Is there a way to force all of the ext net scripts to load on a page other then including a control that uses that script AND is there a way to force the order?

    I have a project that has many extensions and I am using JSBuild to min the files and combine into 1. In order to load the scripts, on the master page I add an extended Ext.Net.Hidden control that the Resources Property adds css and js files I need.

    I did it this way because then other developers would only have to add the
    <abx:ABMaster runat="server" ID="Master1" />
    right after the
    <ext:ResourceManager />
    and all of the js functions and css files would be loaded for them. This allows our multiple internal apps to all look and feel the same.

    The js file includes grid panel extensions that require the extnet-data-js file AND the extnet-data-js file needs to be above the resources file I add otherwise I get a prototype error.

    Currently the source shows in the script area the files is this order:

    /extjs/adapter/ext/ext-base-debug-js/ext.axd?v=16357
    /extjs/ext-all-debug-js/ext.axd?v=16357
    /extnet/extnet-core-debug-js/ext.axd?v=16357
    /WebResource.axd?
    /extnet/extnet-data-debug-js/ext.axd?v=16357
    The WebResource file is the one that is added in the extended hidden control and I need it below the extnet-data file.

    I know I can do this by including a separate js file in each extended control and adding in the controls resource property (the way I currently do it) but I lose the ability to min into 1 file then. We have 15 extended controls with js files and most of them are used on each page.

    Hopefully this made some sense. Please let me know any questions you have.

    Thank You~

    edit: I forgot about Registering the resources. I added
    Net.ResourceManager.RegisterControlResources(Of GridPanel)()
    in the Resources Poperty of the extended hidden control. Works exactly like I need it to!
    Last edited by Daniil; Jan 14, 2011 at 8:55 PM. Reason: [CLOSED]
  2. #2
    Hi,

    Not sure it is something that you need but there is <ext:ResourcePlaceHolder> control that you can placed, for example, into your <head runat="server"> to control the placement of the Ext.Net .js and .css file render location.

    Example
    <ext:ResourcePlaceHolder runat="server" />
  3. #3
    This when can be marked as solved. I edited my original post after I remembered the ResourceManger.RegisterControls. I thought I changed the title but it only fixed it in my post - not the entire thread.

    Thanks~
  4. #4
    Oh, right, there is .RegisterControlResources method.

    Thank you for posting a solution. It can help someone in the future.

Similar Threads

  1. [CLOSED] forcing a gridpanel save
    By mirwais in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Dec 08, 2011, 12:25 PM
  2. [CLOSED] Latest scripts in SVN?
    By rthiney in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jul 13, 2011, 7:24 PM
  3. [CLOSED] Forcing combobox to remain open after selection
    By SymSure in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: May 30, 2011, 9:38 PM
  4. [CLOSED] [1.0] MVC and Scripts
    By Timothy in forum 1.x Legacy Premium Help
    Replies: 14
    Last Post: Feb 24, 2010, 6:13 PM
  5. ComboBox list forcing window to scroll
    By Tbaseflug in forum 1.x Help
    Replies: 2
    Last Post: Sep 03, 2009, 10:35 AM

Posting Permissions