Thanks to assistance from this forum I now have a working understanding of getComponent and ownerCt. But I want to ensure that I am using them correctly.
For example, I have a viewport with a border layout, with West and Center Regions. In the West region, I have a listview nested in a panel and a container. In the Center, a gridPanel is also nested within a panel and a container.
The process loads the store from a listview click. It works, but I'm wondering if there is a better way to reference parent/child containers.
What I do:
- the listview click is relayed to the panel wrapper.
- then, to reference the Viewport:
- var x = this.ownerCt.ownerCt
- to reference the grid:
- var z = x.getComponent('centerRegion').getComponent('grids').getComponent('mainGrid')
- to load the grid:
- z.store.load...
Thanks again for your time,
Dag