We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 5586
    • 8 Posts
    Does anyone know how to auto-select a view node after a reload? I’ve tried a bunch of things, and nothing seems to work.

    Here is my handler for the context menu item. I want to select the node that was edited after this data-store is saved/updated.

    ,editCollection: function(btn, e) {
    var n = this.getSelectedNodes()[0];
    var node = this.cm.activeNode;
    var data = this.lookup[node.id];

    if (!data) return false;

    var r = data;
    if (!this.windows.editCollection) {
    this.windows.editCollection= MODx.load({
    xtype: ’fhc-window-edit’
    ,listeners: {
    ’success’: {fn:function() { this.reload();},scope:this}
    }
    });
    }
    this.windows.editCollection.fp.getForm().reset();
    this.windows.editCollection.setValues(r);
    this.windows.editCollection.show(e.target);
    }


    Thanks for any help anyone can provide!!