[CLOSED] [#59] BeforeItemExpand is being raised just once

Page 3 of 4 FirstFirst 1234 LastLast
  1. #21
    Sorry for the following post: http://forums.ext.net/showthread.php...ll=1#post96114. I started this thread a long time ago and i did not read back all thread's posts.

    So...

    Is it possible to achieve it only by using BeforeLoad, instead of using BeforeItemExpand?
  2. #22
    The difference between http://forums.ext.net/showthread.php...ll=1#post96114 and the following example is that this one uses BeforeLoad handler.

    Using the following example, expand the first (unique) node and you will receive two alerts: Validating Expansion and Not Allowed. After you close both alerts, try to expand the node again and you'll note that the node is died but it is expected that the node expands successfuly.

    Please let me know how you made it work.

    Note: i download the latest version from SVN

    1 - View
    <!DOCTYPE html>
    <html>
    <head runat="server">
        <title>Index</title>
        <script type="text/javascript">
            var isFirstLoad = true;
            var beforeLoad = function (item, operation, options) {
                alert('Validating Expansion');
                if (isFirstLoad) {
                    alert('Not Allowed');
                    isFirstLoad = false;
                    operation.node.set("loading", false);
                    return false;
                }
                return false;
            }
        </script>
    </head>
    <body>
        <ext:ResourceManager ID="ResourceManager1" runat="server" />
        <ext:TreePanel ID="TreePanel2" SelType="Checkbox" runat="server" Title="Tree" Height="700"
            Width="400" Margins="10" RootVisible="false" Border="false">
            <Listeners>
            <BeforeLoad Handler="return beforeLoad(item, operation, options);" />
            </Listeners>
            <Store>
                <ext:TreeStore ID="TreeStore1" runat="server">
                    <Proxy>
                        <ext:AjaxProxy Url="/Example/loadNodeChildren">
                            <ActionMethods Read="POST" />
                            <Reader>
                                <ext:JsonReader Root="data" />
                            </Reader>
                        </ext:AjaxProxy>
                    </Proxy>
                    <Model>
                        <ext:Model runat="server">
                            <Fields>
                                <ext:ModelField Name="Task" />
                            </Fields>
                        </ext:Model>
                    </Model>
                </ext:TreeStore>
            </Store>
            <Root>
                <ext:Node NodeID="0" Text="Root" />
            </Root>
            <ColumnModel>
                <Columns>
                    <ext:TreeColumn ID="TreeColumn1" runat="server" Text="Task" Flex="2" Sortable="true"
                        DataIndex="Task" />
                </Columns>
            </ColumnModel>
        </ext:TreePanel>
    </body>
    </html>
    2 - Action
    public StoreResult loadNodeChildren()
    {
        StoreResult result = new StoreResult();
    
        NodeCollection nodes = new NodeCollection(false);
    
        Node no = new Node();
        no.NodeID = DateTime.Now.Second.ToString();
        no.CustomAttributes.Add(new ConfigItem { Name = "Task", Value = no.NodeID, Mode = ParameterMode.Value });
        nodes.Add(no);
    
        result.Data = nodes.ToJson();
    
        return result;
    }
  3. #23
    I guess the issue still alive (though, indeed, it seems to be partially fixed in 4.1.2).

    There is a note in the Sencha thread that it has been fixed in 4.1.4, but Ext.NET SVN sources still uses 4.1.2.
  4. #24
    Hi Daniil, dou you have any time frame for ExtJs update?
  5. #25
    Hard to say. There is no official date for 4.1.4 yet.
  6. #26
    Thank you Daniil, let's gonna wait to check this issue out.
  7. #27
    Opened an Issue to track this defect, see:
    https://github.com/extnet/Ext.NET/issues/59
  8. #28
    Thank you Daniil
  9. #29
    I re-reported the issue to Sencha.
    http://www.sencha.com/forum/showthread.php?252495
  10. #30
    Please keep me posted about any update regarding this issue.
Page 3 of 4 FirstFirst 1234 LastLast

Similar Threads

  1. Replies: 3
    Last Post: Oct 26, 2009, 12:48 PM

Posting Permissions