[CLOSED] Remove moving a node VS loading target´s children.

  1. #1
    Hi folks, i have a TreePanel with remote load and remote move. When i try to move a node into another that has not been loaded, an exception is throw inside updateIndexes function.

    To reproduce the problem please do the following steps.

    1. Open root node
    2. Do not expand any other node
    3. Drag the last child int second


    Click image for larger version. 

Name:	screen1.jpg 
Views:	86 
Size:	15.6 KB 
ID:	4361

    Click image for larger version. 

Name:	screen2.jpg 
Views:	85 
Size:	22.3 KB 
ID:	4362

    • Note that there is a timer while loading the children of a node. this reproduces the round trip to the database.
    • The exception is not thrown if the target is loaded before moving a node into it



    <ext:TreePanel ID="TreePanel2" runat="server" Title="Remote Move vs Remote Load" Height="700"
        Width="400" Margins="10" Border="false" Mode="Remote" RemoteMoveUrl="/Example/MoveNode">
        <Store>
            <ext:TreeStore ID="TreeStore1" runat="server">
                <Proxy>
                    <ext:AjaxProxy Url="/Example/LoadFakeChildren">
                        <ActionMethods Read="POST" />
                        <Reader>
                            <ext:JsonReader Root="data" />
                        </Reader>
                    </ext:AjaxProxy>
                </Proxy>
            </ext:TreeStore>
        </Store>
        <Root>
            <ext:Node NodeID="0" Text="Root" />
        </Root>
        <Fields>
            <ext:ModelField Name="Task" />
        </Fields>
        <ColumnModel>
            <Columns>
                <ext:TreeColumn ID="TreeColumn1" runat="server" Text="Task" Flex="2" Sortable="true"
                    DataIndex="Task" />
            </Columns>
        </ColumnModel>
        <View>
            <ext:TreeView runat="server" TrackOver="true">
                <Plugins>
                    <ext:TreeViewDragDrop ID="TreeViewDragDrop1" AllowLeafDrop="true" runat="server" />
                </Plugins>
            </ext:TreeView>
        </View>
    </ext:TreePanel>
    public ActionResult MoveNode(string[] ids, string targetId, string point)
    {
        object r = new { actionSuccess = true };
    
        return Content(JSON.Serialize(r), "json/application");
    }
    
    public StoreResult LoadFakeChildren()
    {
        NodeCollection nodes = new NodeCollection(false);
    
        Thread.Sleep(TimeSpan.FromSeconds(3));
    
        for (int indice = 1; indice < 6; indice++)
        {
            Node no = new Node();
            no.NodeID = indice + " " + DateTime.Now.Second;
            no.CustomAttributes.Add(new ConfigItem { Name = "Task", Value = no.NodeID, Mode = ParameterMode.Value });
            nodes.Add(no);
        }
    
        return new StoreResult { Data = nodes.ToJson() };
    }
    Last edited by Daniil; Jun 14, 2012 at 5:26 PM. Reason: [CLOSED]
  2. #2
    Fixed in SVN
    Please update and retest
  3. #3
    Vladmir, a problem was introduced. when i try to move up or down - as brother - the node disappear
  4. #4
    could you check this issue out?
  5. #5
    Thanks for the report. Fixed in SVN, revision #4094.

    Please update and re-test.
  6. #6
    Thank you, please mark it as closed.

Similar Threads

  1. [CLOSED] Remote action refusal when moving a node
    By RCN in forum 2.x Legacy Premium Help
    Replies: 9
    Last Post: Jan 11, 2013, 10:32 AM
  2. [CLOSED] [1.0] Drag Drop on TreePanel - Get reference to Target node
    By danielg in forum 1.x Legacy Premium Help
    Replies: 8
    Last Post: Dec 14, 2011, 11:29 AM
  3. Replies: 4
    Last Post: Nov 03, 2011, 6:46 PM
  4. [CLOSED] Notification - remove moving up
    By SouthDeveloper in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: Oct 26, 2011, 7:08 PM
  5. Replies: 1
    Last Post: Nov 17, 2010, 12:42 PM

Posting Permissions