Hey,

i got the following function to add new childs to an existing node:

Code:
saveModule: function(button) {
        var win = button.up('window'),
            form = win.down('form').getForm(),
            tree = this.getController('Format').getFormatSelection(),
            store = tree.getStore(),
            parent = tree.getSelectionModel().getSelection()[0],
            node = store.getNodeById(parent.getId());


        if (form.isValid()) {
            //tree.collapseAll();
            
            var record = node.createNode({ name: form.findField('module_id').getStore().findRecord('id', form.getFieldValues().module_id).get('name'), leaf: true, parentId: parent.getId() });
            node.appendChild(record);
            record.save({
                success: function() {
                    win.close();
                    store.reload();
                }
            });
        }
    }
The node gets created via my proxy. I can also find the new record in my Database. But i get an error, if i add the childnode to an expanded node:

Uncaught TypeError: Cannot read property 'internalId' of undefined
If i add an record to an collapsed node, i dont get any error...

Is this problem known or am i just doing something wrong?!

Regards
Richie