How to properly apply skin in MVC Northwind sample application?

  1. #1

    How to properly apply skin in MVC Northwind sample application?

    Hi,

    I've noticed that a new skin is not applied to all the content in the sample ASP.NET MVC Northwind app (http://mvc.ext.net/). If you have tabs open in the main working area, the call to Ext.net.ResourceMgr.setTheme('/extjs/resources/css/xtheme-gray-embedded-css/ext.axd', 'gray'); made from Site.Master menu items listeners doesn't have any effect on them.

    Is there any way to enumerate all the open tabs in the application in order to invoke Ext.net.ResourceMgr.setTheme() on their underlying document? What is the best practice to apply a new skin to the whole application?

    Best regards,

    Vadym
  2. #2
    Hi,

    Have a look through the Examples Explorer source. Propagating a Theme change through all child frames is a feature of the main application.

    Hope this helps.
    Geoffrey McGill
    Founder
  3. #3
    Thanks for your quick response Geoffrey !

    According to your suggestions, I'm trying to mimic the logic from ext.net.pro.1.2.full.source\Ext.Net.Examples\Defau lt.aspx for skin application on Site.Master page. Instead of Menu, I'm using a Combobox with the handler defined as follows:

                            
                            <Listeners>
                                <Select Handler="X.GetThemeUrl(this.getValue(),{
                                        success : function (result) {
                                            Ext.net.ResourceMgr.setTheme(result);
                                            tpMain.items.each(function (el) {
                                                if (!Ext.isEmpty(el.iframe)) {
                                                    if (el.getBody().Ext) {
                                                        el.getBody().Ext.net.ResourceMgr.setTheme(result, this.getValue().toLowerCase());
                                                    }
                                                }
                                            });
                                        }
                                    });" />
                            </Listeners>
    I'm getting runtime JS error saying that object X doesn't have GetThemeUrl() method defined. Here's the ResourceManager definition:

    <body>
        <form id="form1" runat="server">
        <ext:ResourceManager runat="server" DirectMethodNamespace="X" IDMode="Explicit" ID="ResourceManager1" />
    What ends up happening at runtime is the X object having ctl00 property which in turn has the GetThemeUrl() method. The full source code is attached. Please advise kindly as I'm at the very beginning of the Ext.Net library evaluation.

    Thanks,

    Vadym
  4. #4

    Attachment

    In case the previous attachment didn't go through...
    Attached Files
  5. #5
    hi vadym.f,
    in ur case, in default.aspx there is a direct method named ''GetThemeUrl". so u should write it in ur code.

    regards.

Similar Threads

  1. Replies: 2
    Last Post: Jul 30, 2012, 6:08 PM
  2. [CLOSED] Northwind MVC sample project
    By RCM in forum 2.x Legacy Premium Help
    Replies: 3
    Last Post: Mar 08, 2012, 7:17 PM
  3. [CLOSED] Coolite MVC Sample Application Not Accessible
    By P2E in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Aug 04, 2010, 5:27 PM
  4. [CLOSED] [1.0] EditableGrid Apply to selection apply to all
    By ashton.lamont in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Feb 24, 2010, 5:49 PM
  5. About Skin of EXT
    By VietView in forum 1.x Help
    Replies: 1
    Last Post: Nov 20, 2008, 2:41 AM

Posting Permissions