PDA

View Full Version : [CLOSED] TreePanel & TreeStore setRootNode() not working anymore?



cleve
Jan 15, 2013, 9:15 AM
Hi guys,

I just updated the source of Ext. Good to see beta2 is bound to this update.
Bad to know the following code not working anymore. Any ideas?



<%@ Page Language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<body id="theBody">
<form runat="server">
<ext:ResourceManager ID="theManager" runat="server"
IDMode="Static"
Theme="Default"
ShowWarningOnAjaxFailure="false"
DirectMethodProxy="Ignore"
ScriptMode="Debug" />

<ext:TreePanel runat="server" ID="tp" Width="200" Height="400">
<TopBar>
<ext:Toolbar runat="server">
<Items>
<ext:Button runat="server" Text="TEST">
<Listeners>
<Click Handler="testFunc(#{tp},#{ts});" />
</Listeners>
</ext:Button>
</Items>
</ext:Toolbar>
</TopBar>
<Store>
<ext:TreeStore runat="server" ID="ts" />
</Store>
<Root>
<ext:Node Text="[root]" EmptyChildren="true" Leaf="true" />
</Root>
</ext:TreePanel>


</form>
<script type="text/javascript">
var testFunc = function (tp, ts) {

var root = {
text: "XX",
leaf: false,
children: [
{ text: "A", leaf: true },
{ text: "B", leaf: true }
]
};

tp.setRootNode(root);
tp.getView().refresh();

window.alert("done");
};
</script>
</body>
</html>
<script runat="server">

protected override void OnInit(EventArgs e)
{
base.OnInit(e);
}

</script>

Daniil
Jan 15, 2013, 11:30 AM
Hi @cleve,

Thank you for the report. We are investigating.

Daniil
Jan 15, 2013, 4:16 PM
This has been fixed in SVN (trunk, v2.2). Thank you again for the report!