Jan 16, 2014, 12:10 AM
[CLOSED] TreeView ItemMove DirectEvent not triggering when ExtraParams are defined.
Problem Description:
I'm trying to code Drag&Drop functionality on a TreePanel. As expected, I'm trying to trigger a controller method to handle the change in the database.
When ExtraParams are defined for the DirectEvent, the controller method is not called. I've checked the traffic and it doesn't send any request to the server. I haven't had time to inspect the sequence of events client-side.
How to reproduce the issue:
1) Define any TreePanel (like the ones in the examples). In my case, I'm defining the view in C# code.
2) Add the TreeViewDragDrop plugin:
Any idea of what might be happening is appreciated.
Cheers,
Carlos
I'm trying to code Drag&Drop functionality on a TreePanel. As expected, I'm trying to trigger a controller method to handle the change in the database.
When ExtraParams are defined for the DirectEvent, the controller method is not called. I've checked the traffic and it doesn't send any request to the server. I haven't had time to inspect the sequence of events client-side.
How to reproduce the issue:
1) Define any TreePanel (like the ones in the examples). In my case, I'm defining the view in C# code.
2) Add the TreeViewDragDrop plugin:
this.View.Add(new TreeView()
{
Plugins =
{
new TreeViewDragDrop()
{
ContainerScroll = true,
AllowLeafDrop = true,
}
}
});
3) Setup the DirectEventthis.DirectEvents.ItemMove.Action = "MoveNode";
this.DirectEvents.ItemMove.ExtraParams.Add(ViewModelHelpers.CreateParameter("item", "item", ParameterMode.Raw));
this.DirectEvents.ItemMove.ExtraParams.Add(ViewModelHelpers.CreateParameter("oldParent", "oldParent", ParameterMode.Raw));
this.DirectEvents.ItemMove.ExtraParams.Add(ViewModelHelpers.CreateParameter("newParent", "newParent", ParameterMode.Raw));
4) Setup the controller methodpublic ActionResult MoveNode(string item, string oldParent, string newParent)
{
//Do something here ...
return this.Direct();
}
If I set a breakpoint on this controller, it's never reached and as I said before, no request is being sent from the browser.Any idea of what might be happening is appreciated.
Cheers,
Carlos
Last edited by Daniil; Jan 16, 2014 at 5:13 AM.
Reason: [CLOSED]