PDA

View Full Version : [CLOSED] TreePanel SubmitNodes Help 2.5.2



LAEUser
Mar 25, 2015, 3:00 PM
Hello

I am calling tree.submitNodes from a JS function. This is during a drag and drop which call itemMove listerner. My question is is it possible to pass parameters to submitNodes from JS something Like
App.tree.submitNodes({.....});

thank you



var moveNode = function (item, oldParent, newParent, index, options) {

var buf = [];
buf.push("Node = " + item.data.text);
buf.push("<br/>");
buf.push("Old parent = " + oldParent.data.text);
buf.push("<br/>");
buf.push("New parent = " + newParent.data.text);
buf.push("<br/>");
buf.push("Index = " + index);

// Ext.Msg.alert("Node droped", buf.join(""));

App.tree.submitNodes();
};




<ext:TreePanel ID="tree" runat="server" Header="false" Frame="true" Icon="ReportPicture" OnSubmit="SubmitNodes"
Border="false" AutoScroll="true" RootVisible="true" UseArrows="true" >
....
<Listeners>
<ItemClick Handler="clickNode(#{tree}, record.data)" />
<ItemMove Fn="moveNode" />
</Listeners>
</ext:TreePanel>

Daniil
Mar 26, 2015, 9:49 AM
Hi @LAEUser,

It should be possible via params.

App.tree.submitNodes({
params: {
param1: "Value 1",
param2: "Value 2",
}
});

LAEUser
Mar 26, 2015, 2:21 PM
Thank you. it is working. please close