Skip to Content
0
Former Member
Apr 04, 2013 at 12:51 PM

extend TreeNode in SAPUI5

115 Views

Hi together,

today I've tried to extend a TreeNode. I'v found in the SCN how to extend a TextField and that works fine.

sap.ui.commons.TextField.extend( "PcTreeNode", {    metadata : {        properties : {            "imcpid" : "string"        }    },    renderer : {        renderInnerAttributes : function( oRm, oTreeNode )        {            oRm.writeAttributeEscaped( 'imc-pid', oTreeNode.getImcPid() );        }    }} );

But if I try exactly the same with an TreeNode:

sap.ui.commons.TreeNode.extend( "PcTreeNode", {    metadata : {        properties : {            "imcpid" : "string"        }    },    renderer : {        renderInnerAttributes : function( oRm, oTreeNode )        {            oRm.writeAttributeEscaped( 'imc-pid', oTreeNode.getImcPid() );        }    }} );

I get the following error:

Error: failed to load 'sap.ui.commons.TreeNodeRenderer' from resources/sap/ui/commons/TreeNodeRenderer.js: 404 - Not Found

Any suggestions?

Thanks in advance.