CopyPastor

Detecting plagiarism made easy.

Score: 0.8278528226996368; Reported for: String similarity Open both answers

Possible Plagiarism

Plagiarized on 2013-07-24
by Hariharan

Original Post

Original - Posted on 2011-07-18
by FoxMulder900



            
Present in both answers; Present only in the new answer; Present only in the old answer;

The tree.getSelectionModel().select(record) function can accept a record instance instead of an id. I would do something like this:
var record = treePanel.getStore().getNodeById('item_id'); treePanel.getSelectionModel().select(record)
Working sample example - http://jsfiddle.net/TBa2E/
The tree.getSelectionModel().select(record) function can accept a record instance instead of an index. I would do something like this:
var record = tree.getRootNode().findChild('id_name','record_id',true); tree.getSelectionModel().select(record);
for more info on the findChild function, check out the NodeInterface docs here: http://docs.sencha.com/ext-js/4-0/#/api/Ext.data.NodeInterface-method-findChild


        
Present in both answers; Present only in the new answer; Present only in the old answer;