View Full Version : [4.1 b2] TreeNodeModel save - iconCls empty

31 Jan 2012, 2:14 PM
I save a new treeNodeModell instance on the server. The success response ist returned as a JSON message with a field node.iconCls. However, when I try to retrieve the value from the node within the success function it is empty.

success: function(node) {
var iconCls = node.get('iconCls'); ...

Worked in [4.0.6].

1 Feb 2012, 6:15 AM
What happens when you look at the node outside the success function?

1 Feb 2012, 11:21 AM
The decision which iconCls to use resides on the server side. I want the client simply to display that decision. What solves (workaround) the problem for me: Overriding a non-persistent NodeInterface field to make it persistent (which is actually not my intension but I can deal with it on the server)

{ name: 'iconCls', type: 'string', defaultValue: null, persist: true }