Jan 17, 2015, 11:38 PM
[CLOSED] TreePanel selectPath throw exception when executed in AfterRender listener
Hi,
I have reproduced the problem in following example:
My question here is... Are we allowed to use "selectPath" in AfterRender listener ?
When I change AfterRender to AfterLayout ... then all is fine.
The reason I am asking is I have got the same problem in slightly different situation...
Thank you
I have reproduced the problem in following example:
<%@ Page Language="C#" %>
<!DOCTYPE html>
<html>
<head runat="server">
<title>Error: Unable to get property 'el' of undefined or null reference</title>
</head>
<body>
<ext:ResourceManager runat="server" />
<ext:TreeStore ID="TreeStore1" runat="server">
<Root>
<ext:Node Expanded="true">
<Children>
<ext:Node Text="app" NodeID="2">
<Children>
<ext:Node Text="Application.js" Leaf="true" NodeID="3"/>
</Children>
</ext:Node>
</Children>
</ext:Node>
</Root>
</ext:TreeStore>
<ext:Viewport
runat="server"
Layout="BorderLayout">
<Items>
<ext:TreePanel
runat="server"
ID="treePanel"
Width="300"
Layout="FitLayout"
RootVisible="true"
Lines="false"
UseArrows="false"
StoreID="TreeStore1" />
</Items>
<Listeners>
<AfterRender Handler="
var tree = #{treePanel};
tree.selectPath('/Root/app/Application.js','text','/')" />
</Listeners>
</ext:Viewport>
</body>
</html>
My question here is... Are we allowed to use "selectPath" in AfterRender listener ?
When I change AfterRender to AfterLayout ... then all is fine.
The reason I am asking is I have got the same problem in slightly different situation...
Thank you
Last edited by Daniil; Jan 30, 2015 at 2:39 PM.
Reason: [CLOSED]