2012-12-13 62 views
0

我有ContainerView的不同childViews。是否可以從childViewinit()方法訪問ContainerView。我一直在使用this.get('parentView')這亙古不變的工作init()方法不能夠從childView訪問ContainerView在init()方法

+1

你叫this._super()試圖訪問parentView過嗎? –

+0

yes..i叫和測試工作it..not ... – thecodejack

+0

哇,肯定需要更多的代碼才能走得更遠 –

回答

1

它應該作爲this._parentView在子視圖的init嘗試。

例如:http://jsfiddle.net/6p6XJ/192/

+0

我試圖it..not工作... – thecodejack

+0

它的工作原理。看看我添加的例子。 –

+0

我是否需要autoinit在應用程序中設置爲false ?? ..表兄弟姐妹,當我不它不是running..check這個http://jsfiddle.net/codejack/rqdSH/2/ – thecodejack