Hello everyone
,
I'm using Ext tree in connection with forms, I'm able to save into database other fields than 'text', but I have problems with loading them, tree is loaded using:
Code:
var treest = new Tree.TreePanel('stbody', {
animate: true,
loader: new Tree.TreeLoader({
dataUrl:'action/isf/get-template.php'
}),
enableDD:true,
containerScroll: true
});
var stroot = new Tree.AsyncTreeNode({
text: TemplateName,
templateid: TemplateId,
templatename: TemplateName,
id: TemplateId,
draggable:false
});
After saving tree I've got values in database, but when each node is generated by loader which get json array with id, text, isfvalue, leaf, cls I receive only 'text' value in form generated by double click on tree element (see code below), when I replace in json array value of text to value of isfvalue then text have it... so I need to do smth to have passed other attributes than standard like 'text', 'leaf' etc via loader... I was looking for baseAttrs... but without efect - I will be very appreciated for any hint or better example 
Code:
treest.on('dblclick', function(e){
ISFActionPERLCODE(e);
}
function ISFActionPERLCODE(e)
{
var dlg = new Ext.BasicDialog("my-dlg", {
height: 350,
width: 600,
title: 'Configure Element',
minHeight: 100,
minWidth: 450,
modal: true,
proxyDrag: true,
shadow: true
});
var simple = new Ext.form.Form({
labelWidth: 111
});
simple.add(
new Ext.form.TextField({
fieldLabel: 'Action',
name: 'action',
disabled: 'true',
value: e.text,
width:350
}),
new Ext.form.TextArea({
fieldLabel: 'Perl Code',
name: 'isfvalue',
value: e.isfvalue,
width:450,
height:150
})
);
simple.addButton('Information about element configuration', ISFActionPERLCODEHelp);
simple.addButton('Save', function() {
e.isfvalue = simple.findField('isfvalue').getValue();
dlg.hide();
});
simple.render(dlg.body);
dlg.addKeyListener(27, dlg.hide, dlg); // ESC can also close the dialog
dlg.show();
}
Thanks in advance
Sunnywind