[CLOSED] [1.0] Operation Aborted in IE7

Page 3 of 4 FirstFirst 1234 LastLast
  1. #21
    Quote Originally Posted by geoffrey.mcgill View Post
    That said, your sample does not appear to reproduce the original issue you posted re: the <Ext.Net.InitScript>. Did you get that one solved?

    This thread is now covering a few different issues, which might appear related, but I don't think are.
    Yes, that was resolved. It was a typo on my end.
  2. #22
    Quote Originally Posted by jchau View Post
    Yes, that was resolved. It was a typo on my end.
    Excellent. Thanks for the update.
    Geoffrey McGill
    Founder
  3. #23
    Even after this <ext:ResourcePlaceholder> issue is fixed, I don't think rendering the scripts/styles inside the <body> is the best solution. It might be better to set RenderScripts and RenderStyles to "None" on the ResourceManager, then manually include the require <script> and <style> includes into your custom rendered <head> block.

    Example

    <ext:ResourceManager runat="server" RenderScripts="None" RenderStyles="None" />
    I'd recommend rendering the scripts/styles into the <head>, and I don't think this will be possible if your <head> section is rendered independently outside of the controls collection.
    Last edited by geoffrey.mcgill; Aug 03, 2010 at 6:51 PM.
    Geoffrey McGill
    Founder
  4. #24
    Quote Originally Posted by geoffrey.mcgill View Post
    Even after this <ext:ResourcePlaceholder> issue is fixed, I don't think rendering the scripts/styles inside the <body> is the best solution. It might be better to set RenderScripts and RenderStyles to "None" on the ResourceManager, then manually include the require <script> and <style> includes into your custom rendered <head> block.

    Example

    <ext:ResourceManager runat="server" RenderScripts="None" RenderStyles="None" />
    I'd recommend rendering the scripts/styles into the <head>, and I don't think this will be possible if your <head> section is rendered independently outside of the controls collection.
    Geoffrey, I actually spent a couple of hours trying to render the scripts into the head. I have the ability to do that but there's no function on ResourceManager to get the scripts. If I set RenderScripts="None", ResourceManager.BuildScripts will not return them. I would like a way for ResourceManager to not add the script includes but still have an exposed function to retrieve them. The reason is that I have custom controls that has Resources property that register their client script files / css files to the ResourceManager. I have tried the following:

    // pseudo code in my Page custom Render function...MyResourceManager initially has RenderScripts = None
    MyResourceManager.RenderScripts = "Embedded"
    //MyResourceManager.SetResources() -- this breaks because later on, it will get called again and it errors on dup keys
    Me.AddToHead(MyResourceManager.BuildScripts())
    MyResourceManager.RenderScripts = "None"
    But that will only give me the default extjs adapter, extjs all, and extnet core. It wont give me any custom scripts for a particular control or extension that are part of the page.
  5. #25
    any updates? just want to see what the time estimate is for a fix or a workaround so our qa team can continue testing.
  6. #26
    Hi,

    Can you update from SVN and retest (ResourcePlaceHolder must be outside the form)?
    Also, now you can use the following code to get scripts if RenderScripts="None" (please note that list of scripts is built during render phase only)
    ResourceManager1.BuildScripts(true)
  7. #27
    Hi,

    Just in case, here is the test cases

    <%@ Page Language="C#" %>
     
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
     
    <script runat="server">
        protected void Page_Load(object sender, EventArgs e) {
            Response.AddHeader("Pragma", "no-cache");
            Response.Cache.SetCacheability(HttpCacheability.NoCache);
    
            this.Page.Controls.AddAt(this.Page.Controls.Count-1, new ResourcePlaceHolder());
        }
    </script>
     
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title></title>
    </head>
    <body>    
        <form id="form1" runat="server">
        <ext:ResourceManager ID="ResourceManager1" runat="server">
        </ext:ResourceManager>
        </form>
    </body>
    </html>
    and

    <%@ Page Language="C#" %>
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
     
    <script runat="server">
        protected void Page_Load(object sender, EventArgs e) {
            Response.AddHeader("Pragma", "no-cache");
            Response.Cache.SetCacheability(HttpCacheability.NoCache);
        }
    </script>
     
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title></title>
    </head>
    <body>
        <ext:ResourcePlaceHolder ID="ResourcePlaceHolder1" runat="server">
        </ext:ResourcePlaceHolder>
        <form id="form1" runat="server">
        <ext:ResourceManager ID="ResourceManager1" runat="server">
        </ext:ResourceManager>
        </form>
    </body>
    </html>
  8. #28
    Quote Originally Posted by vladimir View Post
    Hi,
    Also, now you can use the following code to get scripts if RenderScripts="None" (please note that list of scripts is built during render phase only)
    ResourceManager1.BuildScripts(true)
    BuildScripts(true) doesn't work. It still returns empty string if RenderScripts="None"

    The switch statement in BuildScripts doesn't account for type = None.
      switch (type)
                    {
                        case ResourceLocationType.Embedded:
                        case ResourceLocationType.CacheFly:
                            foreach (string item in items)
                            {
                                source.Append(string.Format(ResourceManager.ScriptIncludeTemplate, this.GetWebResourceUrl(ResourceManager.ASSEMBLYSLUG + item)));
                            }
                            break;
                        case ResourceLocationType.File:
                        case ResourceLocationType.CacheFlyAndFile:
                            foreach (string item in items)
                            {
                                source.Append(string.Format(ResourceManager.ScriptIncludeTemplate, this.ConvertToFilePath(ResourceManager.ASSEMBLYSLUG + item)));
                            }
                            break;
                    }
  9. #29
    Also, if I call BuildScripts during the rendering of my custom head, other controls' resources have not been registered yet. Here's what I think is happening:

    Page Render
    Head Render
    Ext.Net.ResourceManager.BuildScripts(true)
    Form Render
    XControl Render
    XControl.RegisterResources <-- this happens AFTER the head has been rendered so this controls' resources are never outputted
  10. #30
    Hi,

    Each control registers own resources during rendering, so, full list of scripts is available after last control rendering
    Therefore BuildScripts method is not so useful for you.
    What about to place ResourcePlaceHolder at the end of the body (like in my test case)?
    this.Page.Controls.AddAt(this.Page.Controls.Count-1, new ResourcePlaceHolder());
Page 3 of 4 FirstFirst 1234 LastLast

Similar Threads

  1. Combobox Item with operation symbols
    By inaltec in forum 1.x Help
    Replies: 1
    Last Post: Feb 01, 2012, 5:39 PM
  2. Replies: 0
    Last Post: Nov 30, 2011, 12:51 PM
  3. Grid Panel Export Operation
    By sumesh in forum 1.x Help
    Replies: 1
    Last Post: May 30, 2011, 11:32 AM
  4. Operation Requires an Ajax Request
    By dan182 in forum 1.x Help
    Replies: 1
    Last Post: Feb 23, 2011, 12:58 PM
  5. This operation requires an Ajax request
    By dan182 in forum 1.x Help
    Replies: 0
    Last Post: Feb 03, 2011, 10:34 AM

Posting Permissions