cancel
Showing results for 
Search instead for 
Did you mean: 

ref. "Creating Trees in Web Dynpro (12)" -> need help

Former Member
0 Kudos

Hello dear colleagues,

While trying to work through the sample tutorial "Creating Trees in Web Dynpro (12)", I'm forced to some problems.

I'm using NW-developer-studio 2.0.5.

I went through the tutorial up to line 12 and everything went fine, till now.

While implementing the methods addChildren(...) page 13 and the following code lines I get the following error:

IPrivateTreeView.ITreeNodeElement cannot be rsolved or is not a type. There is another Class

IPrivateTreeView.ITreenodeElement existing.

Additionally there are no functions getText(...), getIsExpanded(...) (wich should refer to the attribute values of the context, I think...) but there are functions getAttributes(String arg0)...

child = parent.nodeChildNode().createTreeNodeElement(); is not working, too

child = parent.node().createElement() works after having transformed parent from IPrivateTreeView.ITreeNodeElement to IPrivateTreeView.ITreenodeElement.

There is an endless list of other errors and not found classes (by the way: I know how to organize imports) but it would be very helpful soluting these problems. Regards and thank's Robert.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Robert,

the names of the nodes you create in a controller context are influencing the generation of the corresponding controller classes.

If you create a node named "TreeNode", you'll get "ITreeNodeElement", if you name it "Tree<b>n</b>ode", you'll get "ITree<b>n</b>odeElement".

I guess you copied and pasted some code from the tutorial, where the node is named "TreeNode", while your's name is "Treenode".

The missing attribute getters and setters indicate, that the corresponding attributes are missing in the corresponding context. Please recheck that.

Hope that helps.

Regards

Stefan

Former Member
0 Kudos

Hello Stephan,

that helped but there's another problem:

I call this in wdDoInit()

{

...

resourceHandlerForTree.loadResourceBundle("com.sap.tut.wd.tree.resources.Filesystem",this.getClass().getClassLoader());

...

}

that's the rsult:

Error stacktrace:

java.util.MissingResourceException: Can't find bundle for base name com.sap.tut.wd.tree.resources.Filesystem, locale de

at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:804)

I did all like explained in the Tut. The file "Filesystem.properties" is existing in the package com.sap.tut.wd.tree.ressources in the folder src/packages.

This error is not clear to me and I hope for help.

Thank's lot, regards Robert.

Former Member
0 Kudos

Hi Robert,

i'll have a look at the corresponding tutorial over the weekend (it's a shame i haven't done this before, i know). I'll call you back

Have a nice weekend anyway!

Stefan

Former Member
0 Kudos

Hello Stephan,

thank's a lot. I'll wait for your response. Greets, Robert.

Former Member
0 Kudos

Hi Robert,

the tutorial works as described. Please ensure the following:

1. In the Web Dynpro Explorer open the directory src->packages->com->sap->tut->wd->tree->resources. There must be a file "Filesystem.properties". Please recheck the directory name, in your last question, you've written, that the package you created ends with "ressources", but it must be "resources".

2. If the package is correct, but the file is not visible (it's important to see it in the WD explorer at the location described before), refresh the project via the context menu (right click on project -> Refresh).

There's no magic in it, but the path(s) respective packages must be correct. The error you're getting simply says, that the resource (the ".properties" is appended by the resource loader) doesn't exist. So there's something wrong with your package structure (it doesn't conform to the Java package path which is used for resource loading).

Hope that helps.

Regards

Stefan

PS: If the folder is really misnamed ("ressources") change the resource loading statement to:

resourceHandlerForTree.loadResourceBundle(
  "com.sap.tut.wd.tree.<b><u>ressources</u></b>.Filesystem",
  this.getClass().getClassLoader());

This is easier than reimporting the file.

Former Member
0 Kudos

Hi Stefan,

I was blind like a bat. You're totally right, that caused the error. Now all works fine. Thank's a lot for your help. Regards, Robert.