PDA

View Full Version : TreeEditor config params



MD
1 Jul 2007, 2:37 PM
It appears that TreeEditor config params aren't overriding the defaults in ext-all/etc. For example, hideEl and shadow, I had to manually override the defaults to have it hide the underlying element and use the "sides" shadow type.



myTreeEditor = new Ext.tree.TreeEditor(artists_tree, {
cancelOnEsc: true,
hideEl: true, //<-HAD TO EDIT IN SOURCE TO EFFECT A CHANGE
ignoreNoChange: true,
revertInvalid: true,
shadow: 'sides', //<-HAD TO EDIT IN SOURCE TO EFFECT A CHANGE
selectOnFocus: true
});



//IN EXT-ALL.JS/ETC.
Ext.extend(Ext.tree.TreeEditor, Ext.Editor, {
alignment: "l-l",
autoSize: false,
hideEl : true, //<-HAD TO MANUALLY CHANGE THIS TO true FROM ITS DEFAULT false
cls: "x-small-editor x-tree-editor",
shim:false,
shadow:"sides", //<-HAD TO MANUALLY CHANGE THIS TO sides FROM ITS DEFAULT frame
maxWidth: 250,

jack.slocum
1 Jul 2007, 9:53 PM
The config being passed is a form fields config, not the editors config.

MD
2 Jul 2007, 1:19 PM
Forgive me Jack -- so this is a case of the docs being wrong for TreeEditor? I'm not quite clear on where, when setting up the TreeEditor, you have an option to push that config to the form field it creates.

jack.slocum
2 Jul 2007, 2:08 PM
Forgive me Jack -- so this is a case of the docs being wrong for TreeEditor? I'm not quite clear on where, when setting up the TreeEditor, you have an option to push that config to the form field it creates.

No, the docs look correct:

* @param {Object} config Either a prebuilt {@link Ext.form.Field} instance or a Field config object

gimler
4 Sep 2007, 12:22 AM
i have the same problem but i don`t now how can i make a field config object ;(



// tree editor
this.treeEditor = new Tree.TreeEditor(this.tree, {cancelOnEsc: true, completeOnEnter: true, ignoreNoChange: true});

// install default handling of edit complete
this.treeEditor.on({
complete: {scope:this, fn:this.renameNode}
});


greetings
gimler

mystix
4 Sep 2007, 12:25 AM
@gimler, i would post that in Help, not Bugs.

8887