[CLOSED] DurationMessages when loading GridPanel and TreePanel

  1. #1

    [CLOSED] DurationMessages when loading GridPanel and TreePanel

    On the following sample, DirectMessages are shown as expected.

    <!DOCTYPE html>
    <html>
    <head runat="server">
        <script type="text/javascript">
            var invokeDirectMethod = function () {
                Ext.net.DirectMethod.request({
                    url: Ext.net.ResourceMgr.resolveUrl("~/Example/Method001"),
                    success: function () {
                        alert('Success');
                    },
                    failure: function () {
                        alert('Failure');
                    }
                });
            }
        </script>
    </head>
    <body>
        <ext:ResourceManager Theme="Crisp" runat="server">
            <DirectEventDurationMessages>
                <ext:DurationMessage Duration="0" Message=".NET" />
                <ext:DurationMessage Duration="4000" Message="Ext.JS" />
                <ext:DurationMessage Duration="6000" Message="Ext.NET" />
                <ext:DurationMessage Duration="8000" Message="Object.NET" />
            </DirectEventDurationMessages>
        </ext:ResourceManager>
        <ext:Button Text="Invoke Direct Method" runat="server">
            <Listeners>
                <Click Handler="invokeDirectMethod();" />
            </Listeners>
        </ext:Button>
    </body>
    </html>
    I would like to know whether it's possible to show DurationMessage when loading GridPanel's Store
    <!DOCTYPE html>
    <html>
    <head runat="server">
    </head>
    <body>
        <ext:ResourceManager Theme="Crisp" runat="server">
            <DirectEventDurationMessages>
                <ext:DurationMessage Duration="0" Message=".NET" />
                <ext:DurationMessage Duration="4000" Message="Ext.JS" />
                <ext:DurationMessage Duration="6000" Message="Ext.NET" />
                <ext:DurationMessage Duration="8000" Message="Object.NET" />
            </DirectEventDurationMessages>
        </ext:ResourceManager>
        <ext:GridPanel Title="Ext.Net" Border="true" Width="500" Height="500" runat="server">
            <Store>
                <ext:Store ID="_str" runat="server">
                    <Proxy>
                        <ext:AjaxProxy Url="~/Example/LoadFakeRecords/">
                            <Reader>
                                <ext:JsonReader RootProperty="data" />
                            </Reader>
                        </ext:AjaxProxy>
                    </Proxy>
                    <Model>
                        <ext:Model IDProperty="ID" runat="server">
                            <Fields>
                                <ext:ModelField Name="ID" Type="String" />
                                <ext:ModelField Name="Name" Type="String" />
                                <ext:ModelField Name="LastName" Type="String" />
                                <ext:ModelField Name="Address" Type="String" />
                            </Fields>
                        </ext:Model>
                    </Model>
                </ext:Store>
            </Store>
            <ColumnModel runat="server">
                <Columns>
                    <ext:Column Text="ID" DataIndex="ID" runat="server" />
                    <ext:Column Text="Name" Flex="1" DataIndex="Name" runat="server" />
                    <ext:Column Text="Last Name" DataIndex="LastName" runat="server" />
                    <ext:Column Text="Address" DataIndex="Address" runat="server" />
                </Columns>
            </ColumnModel>
            <View>
                <ext:GridView LoadMask="true" runat="server" />
            </View>
        </ext:GridPanel>
    </body>
    </html>
    And when loading TreePanel's Store
    <!DOCTYPE html>
    <html>
    <head runat="server">
    </head>
    <body>
        <ext:ResourceManager Theme="Crisp" runat="server" />
        <ext:TreePanel RootVisible="false" Title="Ext.Net" Border="true" Width="500" Height="500" runat="server">
            <Store>
                <ext:TreeStore runat="server">
                    <Proxy>
                        <ext:AjaxProxy Url="~/Example/LoadTreeFakeChildren">
                            <Reader>
                                <ext:JsonReader RootProperty="data" />
                            </Reader>
                        </ext:AjaxProxy>
                    </Proxy>
                    <Model>
                        <ext:Model runat="server">
                            <Fields>
                                <ext:ModelField Name="Name" />
                                <ext:ModelField Name="LastName" />
                            </Fields>
                        </ext:Model>
                    </Model>
                </ext:TreeStore>
            </Store>
            <Root>
                <ext:Node NodeID="0" Text="Root" />
            </Root>
            <ColumnModel>
                <Columns>
                    <ext:TreeColumn Text="Name" DataIndex="Name" Flex="2" runat="server" />
                    <ext:Column Text="LastName" DataIndex="LastName" runat="server" />
                </Columns>
            </ColumnModel>
            <View>
                <ext:TreeView LoadMask="true" runat="server" />
            </View>
        </ext:TreePanel>
    </body>
    </html>
    namespace SandBox.Controllers
    {
        public class ExampleController : System.Web.Mvc.Controller
        {
            public ActionResult Button()
            {
                return View();
            }
    
            public ActionResult GridPanel()
            {
                return View();
            }
    
            public ActionResult TreePanel()
            {
                return View();
            }
    
            public AjaxResult Method001()
            {
                Thread.Sleep(TimeSpan.FromSeconds(10));
    
                return new AjaxResult();
            }
    
            public StoreResult LoadFakeRecords()
            {
                Thread.Sleep(TimeSpan.FromSeconds(10));
    
                List<Entity> lst = new List<Entity>();
    
                for (int index = 0; index < 15; index++)
                {
                    lst.Add(new Entity
                    {
                        ID = index,
                        Name = string.Format("Name - {0}", index),
                        LastName = string.Format("Last Name - {0}", index),
                        Address = string.Format("Address - {0}", index)
                    });
                }
    
                return new StoreResult(lst, lst.Count());
            }
    
            public StoreResult LoadTreeFakeChildren()
            {
                Thread.Sleep(TimeSpan.FromSeconds(10));
    
                NodeCollection nodes = new NodeCollection(false);
    
                for (int index = 1; index < 6; index++)
                {
                    Node no = new Node();
                    no.NodeID = index.ToString() + DateTime.Now.Second;
                    no.CustomAttributes.Add(new ConfigItem { Name = "Name", Value = string.Format("Name - {0}", no.NodeID), Mode = ParameterMode.Value });
                    no.CustomAttributes.Add(new ConfigItem { Name = "LastName", Value = string.Format("Last Name - {0}", no.NodeID), Mode = ParameterMode.Value });
                    nodes.Add(no);
                }
    
                return new StoreResult { Data = nodes.ToJson() };
            }
    
        }
    
        public class Entity
        {
            public int ID { get; set; }
    
            public string Name { get; set; }
    
            public string LastName { get; set; }
    
            public string Address { get; set; }
        }
    }
    Thanks in advance
    Last edited by Daniil; Mar 24, 2015 at 10:25 AM. Reason: [CLOSED]
  2. #2
    Hi Raphael,

    Thank you for the request!

    Unfortunately, it is not supported currently. Anup has asked about that as well.
    http://forums.ext.net/showthread.php...l=1#post223151

    At the moment, I cannot say it will be implemented ever and when. Though, we would love to get it implemented.

    I am referring this thread in the Issue and closing.

Similar Threads

  1. [CLOSED] TreePanel not loading nested nodes.
    By RCN in forum 3.x Legacy Premium Help
    Replies: 4
    Last Post: Dec 10, 2014, 11:11 AM
  2. [CLOSED] pre-loading a TreePanel BUT only for 1 or 2 levels?
    By adrianot in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: May 07, 2014, 2:54 PM
  3. [CLOSED] Treepanel dynamic loading with autoexpand
    By softmachine2011 in forum 2.x Legacy Premium Help
    Replies: 3
    Last Post: Sep 07, 2012, 12:41 PM
  4. [CLOSED] Loading TreePanel in MVC
    By webppl in forum 1.x Legacy Premium Help
    Replies: 10
    Last Post: Feb 21, 2011, 10:10 PM
  5. Replies: 1
    Last Post: Feb 23, 2009, 5:24 PM

Posting Permissions