PDA

View Full Version : [Partially solved] Treelist reference not set inside Architect ?



senacle
28 Aug 2017, 12:30 AM
Hello,

I put a treelist with its reference :



{
xtype: 'treelist',
reference: 'navigationTreeList',
name: 'NavigationTree',
expanderFirst: false,
expanderOnly: false,
highlightPath: true,
store: 'NavigationTreeStore',
listeners: {
selectionchange: 'onTreelistSelectionChange'
}
}


I want to refer to this list in some code :



var treelist = this.lookupReference('navigationTreeList')


In Firefox, there's this error message :


TypeError: treelist is null

After searching for some time, i see that the reference doesn't appear in the ViewModel. Other references are OK. See joigned screen capture (some errors appear when trying to manage attachment, i put the file on an other provider).

https://img11.hostingpics.net/thumbs/mini_537112treelistreference.png (https://www.hostingpics.net/viewer.php?id=537112treelistreference.png)

It does not matter whether the element is isolated or in another view, the reference doesn't appear.

How to fix this ?

senacle
28 Aug 2017, 1:18 AM
You know what ? I'm a little confused.
I launch my app in firefox.
When clicking first time on button which executes this.lookupReference('navigationTreeList'), it's OK.

Debug screen shot under FireFox :

https://img11.hostingpics.net/thumbs/mini_912879treelistreferencefirstclick.png (https://www.hostingpics.net/viewer.php?id=912879treelistreferencefirstclick.png)

When clicking second and next time on button which executes this.lookupReference('navigationTreeList'), it's NOK !!!

Debug screen shot under FireFox :

https://img11.hostingpics.net/thumbs/mini_193031treelistreferencenextclick.png (https://www.hostingpics.net/viewer.php?id=193031treelistreferencenextclick.png)

senacle
31 Aug 2017, 2:40 AM
You know what ? I'm a little confused.
I launch my app in firefox.
When clicking first time on button which executes this.lookupReference('navigationTreeList'), it's OK.

Debug screen shot under FireFox :

https://img11.hostingpics.net/thumbs/mini_912879treelistreferencefirstclick.png (https://www.hostingpics.net/viewer.php?id=912879treelistreferencefirstclick.png)

When clicking second and next time on button which executes this.lookupReference('navigationTreeList'), it's NOK !!!

Debug screen shot under FireFox :

https://img11.hostingpics.net/thumbs/mini_193031treelistreferencenextclick.png (https://www.hostingpics.net/viewer.php?id=193031treelistreferencenextclick.png)

All is working well now.
Just clear the browser cache and it's ok.
May be need to restart browser also.

senacle
31 Aug 2017, 2:43 AM
The reference doesn't appear in the ViewModel. Other references are OK. See joigned screen capture (some errors appear when trying to manage attachment, i put the file on an other provider).

https://img11.hostingpics.net/thumbs/mini_537112treelistreference.png (https://www.hostingpics.net/viewer.php?id=537112treelistreference.png)

It does not matter whether the element is isolated or in another view, the reference doesn't appear.

How to fix this ?


May be in the next sencha cmd release ?