on 03-09-2007 7:56 AM
I am new to WebDynPro.
I am working with Netweaver Studio version 2.0.14
I am trying to use a Tree UI element.
The tree element(context) has recursive node and 4 attributes. The UI element has been binded to context.
I have coded following init method to initialize the tree element.
IPrivateTreeCom1View.ITreeNodeElement nodeelement;
for(int i=0;i<2;i++)
{
nodeelement = wdContext.createTreeNodeElement();
nodeelement.setText("Node:");
nodeelement.setLevel(1);
nodeelement.setHasChildren(true);
nodeelement.setIgnoreAction(false);
wdContext.nodeTreeNode().addElement(nodeelement);
for(int j=0;j<4;j++)
{
IPrivateTreeCom1View.ITreeNodeElement level2element = nodeelement.nodeChild().createTreeNodeElement();
level2element.setText("Level 2 element"+j);
level2element.setLevel(2);
level2element.setHasChildren(true);
nodeelement.nodeChild().addElement(level2element);
}
When I try to run the application it throws following exception
The initial exception that caused the request to fail, was:
java.lang.NullPointerException
at com.sap.tc.webdynpro.clientserver.uielib.standard.uradapter.TreeAdapter$Nodes.next(TreeAdapter.java:1326)
at com.sap.tc.ur.renderer.ie6.TreeRenderer.renderTreeNodeFragment(TreeRenderer.java:2335)
at com.sap.tc.ur.renderer.ie6.TreeRenderer.renderTreeFragment(TreeRenderer.java:673)
at com.sap.tc.ur.renderer.ie6.TreeRenderer.render(TreeRenderer.java:69)
at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.RenderManager.render(RenderManager.java:434)
... 44 more
Please help.
Suresh Yadav
Hi Suresh Yadav
Check this URL and you will some solutions to your problem
http://help.sap.com/saphelp_nw04/helpdata/en/13/4cde139306304480e89d815ffcf891/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/5c/1b76bc3da0504e8b535cf3e154eaa7/frameset.htm
Regards
Chandran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I haven't added the TreeNodeType UI element and hence also didn't bind it to the context.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
The Problem is in the Tree UI Element Properties.
<b>You have not set the DataSource of the Tree UI Element to the Node which contains Attributes and Recursive Node. If it is not set it will show error.</b>
(The DataSource Properties of Tree and TreeNodeType must be bound to the context).
Regards
Satish Kumar SV
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I had not bind the TreeNodeType.dataSource with the context that provided the tree data.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Verify if Tree.dataSource and TreeNodeType.dataSource are bound to the context node providing the tree data (not the recursive subnode).
Context:
TreeNode
-- Attribute1
-- Child (recursive subnode)
UI element:
Tree
-- TreeNodeType
Tree.dataSource = TreeNode
TreeNodeType.dataSource = TreeNode
TreeNodeType.text = TreeNode.Attribute1
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Please check if you have added TreeNodeType UI element in your view and you have binded all the properties to that TreeNodeType properly.
Because for Tree UI to work, you will need TreeNodeType created inside your Tree UI.
Regards,
Mausam
Message was edited by:
Mausam Kakkad
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.