Recursive and loadable webdynpro tree
Hi
I was trying the "Constructing a Recursive and loadable webdynpro tree" example...I completed all the steps.But when I deployed it it trew an error
500 Internal Server Error
Failed to process request. Please contact your system administrator.
Could some one tell me where I went wrong....I was able to deploy the sample application for the same
Regards
Krishna
Hi,
please look in the properties of the parent Node from recursive node.
Please check this:
cardinality 0..n
collectionType list
initializeLeadSelection true
selection 0..1
singleton true
If you show in the first view the Tree
you can get an 500 Internal server error.
Regards
Gunter
Similar Messages
-
Constructing a Recursive and Loadable Webdynpro tree
Hi ,
When I try to
Construct a Recursive and Loadable Webdynpro tree ,First I downloaded the zip file "12TutWD_Tree_Init.zip" file from "sdn.sap.com" .And I saved it my local drive ie in C:/ , but when i try to get the extracted zip file the resoective path is not showing in the webdynpro inport screen.
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/47ce9b90-0201-0010-59b5-f70826824eee
I am following the above document .
Can any body help regarding where to save the zip file and hoe to get imported to NWDS.
Thank you,
Regards,
RamanaHallo Ramana,
extraxt this zip-file to some folder on your hard-drive or directly under the workspace folder of your SAP NetWeaver Developer Studio. Is the project listed within the navigation tab. Open it there when it is closed. Did you open the Web Dynpro Perspective?
Regards, Bertram -
Recursive & Loadable WD-Tree-Tutorial: Problems with parameters; NullPointe
Hello all, it's me again
This time I have a problem with the Tutorial called "Constructing a Recursive and Loadable WD-Tree". I followed each step in detail, but when I deploy it all I see several errors/mistakes in my resulting App:
1. I can click on the "directories" in this example and the directory-text is displayed in the InputForm. Normally it should only display "filenames", not directory-names... I checked the bool-properties in the addChildren-method and they are set as it's said in the tut.
2. When I try to expand any of the two nodes (C or Games; D is already expanded and includes "Games") I get a NullPointerException for the addChildren()-method in the first line (parent.nodeChildNode();). So the parameter "parent" is null or does at least not contain what it's expected to.
3. I have some Warnings: "TreeNodeType 'onAction.onAction': Parameters of action 'Select' and event 'onAction' are not compatible" and the same again for the second action (LoadChildren). So perhaps problem 2 can be solved by solving no 3?!
I'm stuck. Can anyone help me please?
I doublechecked that everything is as said in the tutorial.
Regards
MichaelHi
I realized I had an "Warning"-Message at my View-Context-Root-Node, where it said "Migrate Context". After I did this I get an "internal server error", Failed to process request.
Hmm, it seems as if there were a lot of changes from NW2004 to NW7.1, cause when I try to deploy the ready-to-deploy-tutorial (downloadable along with the Initial project template from SDN) I get deployment errors.
So I'll stop it now or perhaps try my own implementation (with java.io.File and recursive methods and loadable tree) to get familiar with the tree-thing in WD/Java
Thanks so far for the help, it's greatly appreciated.
Michael -
How to scroll to a specific node in the webdynpro tree
Hi all,
I'm developing an application where I need to load and expand a tree upon some action in another view.
Loading the children, expanding nodes and setting a new lead selection (with cl_wd_dynamic_tool=>set_tree_lead_selection) all works fine.
But I did not find a way to scroll the tree, so that the node is in the currently visible area of the tree. Is there a way to do this?
Thanks for your answers!
Best regards,
FrankTree is a particular structure, you need to realize a recursive function, specially if the tree with is a recursive TreeNode.
this is a quickly answer, i did this in java.
The idea is the same everywhere, this is an ABAP-LIKE solution, understand and translate in a good ABAP source.
FUNCTION FindNode(TypeNode tree_node, TypeNode node_to_find ).
IF ( tree_node.ELEMENT_ID EQ node_to_find.ELEMENT_ID ).
""""""" do what you wanna do """""
ELSE.
n = tree_node.GET_NUMBERS_OF_CHILDS;
""""""""" RECURSION
FOR i = 0 TO n.
child_node = tree_node.GET_CHILD(i).
CALLFUNCTION FindNode(child_node, node_to_find ).
ENDFOR.
ENDIF.
ENDFUNCTION. -
Accessing KM Content using Webdynpro Tree Application
Hi,
I want to create a webdynpro tree structure application which pulls out the KM Content into the tree Structure. How can i do that? Where can i give the KM path and make the KM documents reflect in the tree?
Does any body have code samples related to this? Can anybody help me out in fixing this issue.
Regards,
DivyaHello,
Here you have a sample to configure the environment, get access to KM and how to upload a file.
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a099a3bd-17ef-2b10-e6ac-9c1ea42af0e9?quicklink=index&overridelayout=true
Here, you have a sample code, where you instance a resource (a folder or file into KM repository) and you can do with it whatever you want.
final IResourceFactory aResourceFactory = ResourceFactory.getInstance();
RID rid = new RID(strRid); --> path where your are looking for your folders. "/documents", for instance.
ResourceContext resourceContext = new ResourceContext(WPUMFactory.getServiceUserFactory().getServiceUser("cmadmin_service"));
IResource r = aResourceFactory.getResource(rid, resourceContext);
Try and catch are missing, but that is the code to have an instance of a KM resource.
Regards,
David. -
WD ABAP: Recursion Nodes that Repeat Tree Nodes with Embedded Tables ???
At Rich H's suggestion, I'm posting this here as well as in the blogs.
Suppose you've got a tree context with a node that has a table embedded under it. (For example, the TREE_WITH_TABLE view of WDR_TEST_EVNT has this kind of context substructure.) Call this node "NODE_WITH_TABLE."
You now define a recursion node underneath "NODE_WITH_TABLE" and specify "NODE_WITH_TABLE" as the repeated node for this recursion node. Call this recurion node "RECURSION_NODE".
Lo and behold - the table fills properly when you're on any instance of "NODE_WITH_TABLE", but not when you're on an instance of "RECURSION_NODE".
I'm hoping that:
a) I'm doing something wrong;
OR
b) There's an easy work-around/alternative I'm not seeing
OR
c) SAP will give recursion nodes enough memory to carry any table(s) embedded in the nodes they're repeating.
'Cause I sure don't want to have to define "n" levels of tree-nodes that have different copies of the same table(s) embedded in them.
Message was edited by: Armin Reichert/people/david.halitsky/blog/2006/08/16/recursion-nodes-that-repeat-tree-nodes-with-embedded-tables-in-wd-abap-not
Maybe you might want to back out your weblog as it is not really a place to ask these types of questions. Think of it this way, if you are allowed to do this type of weblog, what is stopping any other weblogger. Hence the weblogs would just be another forum, which I don't think anyone wants.
Regards,
Rich Heilman -
How to Recursively traverse a Dom Tree
Hi there, I'm new to java and xml and would like to see some sample code on recursively traversing a DOM tree in java, printing out all Element, Text, etc to the console window.
Please helpUse this: DomRead.java at your own risk. caveat: this gets screwed up if the attributes are multi-valued. You can use XPath to get around that. I am struggling with the proper XPath expressions.
import org.xml.sax.*;
import org.w3c.dom.*;
import java.util.*;
* version 1.0
public class DomRead implements ErrorHandler
private static final String CRLF = System.getProperty("line.separator");
private static String key = "";
private static String value = "";
private Hashtable elements = new Hashtable();
* This constructor has to be used to pass in the DOM document which needs to
* be read so that this class can generate the hashtable with the attributes as
* keys and their corresponding values.
public DomRead(Document rootDoc)
process(rootDoc);
private void processChild(NodeList root)
for(int i=0;i<root.getLength(); i++)
process(root.item(i));
private void printAttrib(Node root)
NamedNodeMap attrib = root.getAttributes();
int len = attrib.getLength();
if(len == 0) return;
for(int i=0; i < len ; i++)
Attr attribute = (Attr) attrib.item(i);
key = attribute.getNodeValue();
private void process(Node root)
switch( root.getNodeType())
case Node.DOCUMENT_NODE :
Document doc = (Document) root;
processChild(doc.getChildNodes());
break;
case Node.ELEMENT_NODE :
root.setNodeValue(root.getNodeValue() );
printAttrib(root);
processChild(root.getChildNodes());
break;
case Node.TEXT_NODE :
Text text = (Text) root;
value = text.getNodeValue().trim();
//Log("Value: "+value+CRLF);
if(!value.equalsIgnoreCase(""))
elements.put(key, value);
break;
* Use this method, if you intend to print out the contents of the generated
* hashtable.
public void printElements()
for (Enumeration enum = elements.keys(); enum.hasMoreElements() ;)
String tKey = (String)enum.nextElement();
Log(tKey+"::::"+(String)elements.get(tKey));
* This method returns the Hashtable with the attributes that have non-empty
* values.
public Hashtable getElements()
return elements;
public void error(SAXParseException e)
e.printStackTrace();
public void warning(SAXParseException e)
e.toString();
public void fatalError(SAXParseException e)
e.printStackTrace();
private static void Log(String log)
System.out.print(log+CRLF);
} -
Displaying KM content using Webdynpro Tree Application
Hi,
I want to create a webdynpro tree structure application which pulls out the KM Content into the tree Structure. How can i do that? Where can i give the KM path and make the KM documents reflect in the tree?
Does any body have code samples related to this? Can anybody help me out in fixing this issue.
Regards,
LeonHi
Try these
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/f02b492c-7d76-2a10-86aa-e11e8388fde8
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/3095f14c-29c5-2b10-f69e-edcb6f0f1367
Best Regards
Satish Kumar -
Develop MDM Heirarchy table using Webdynpro Tree
Hi
Can anyone let me know how i can build a MDM Heirarchy table using webdynpro tree.
ThanksCan you be more specific? Is your problem with MDM or Web Dynpro? And what do you mean by "build an MDM Hierarchy Table"?
Walter -
Where do i find daily posted question on sap abap and sap webdynpro abap
Hi
where do we find Daily posted questions on sap abap and sap webdynpro abap in scn sap so that i can go through the questions and answer them .Hi,
Go to the Content tab of any space and click on discussions. Then you can sort them by date created or any other
For ex: This link for WDA discussions: - Web Dynpro ABAP
You can also click on Receive email notifications for any space to get updates on that space.
hope this helps,
Regards,
Kiran -
How to maintain several views of the same data and update a tree
I have an object UiUser, which is displayed in my application in several different views. There are three different views which all have the User object i.e. search results, user tree and user table. Each of the views has the same menu items, so the user can be deleted from any of the views.
What I am trying to work out is how should I ensure the item is updated in all of the views?
I can fire a property change event with the UiUser and update two of the views i.e. search results and user table, but how do I update the tree?
I thought of overiding the equals/hashcode methods of the UserTreeNode to compare uiUser.getId () and I could then search the tree and find the tree node of the required UiUser. But I have reservations about this whole approach as it just seems wrong.
Any ideas of how to keep N views in sync, I really don't want all of the views to have tree nodes as this equally seems wrong. This should be a simple problem to solve and I'm sure lots of people have done it, I'm just not sure which is the best approach to take.
ThanksHi Jan,
This is so because each installer has a GUID that is used to check whether the application needs to be upgraded or not. (It's a Microsoft function).
What you can do is create a new installer with a different GUID (copy the installer in the projects), and check witha text editor whether this GUID has changed.
But any specific reason you need two seperate installs? You can run the application twice with a specific INI token:
allowmultipleinstances=True
Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas
LabVIEW, programming like it should be! -
I will type in google let say tree the search will click on to one of the searches and instead of tree web page showing up a ad page will come up this happens with very thing can you help.
You (or your kids) inadvertently installed adware. You do not need to download or install anything to fix it.
Any tips on how to stop it from happening?
Yes. To learn how to avoid it in the future read How to install adware.
If you require them, Apple's removal instructions are linked in the Recovery Procedure near the end of that document. Read and follow them carefully. Pay particular attention to the easily overlooked passages directing you to restart your Mac when required. -
How to cut, copy and paste a tree node in JTree?????
Hi, Java GUI guru. Thank you for your help in advance.
I am working on a File Explorer project with JTree. There are cut, copy and paste item menus in my menu bar. I need three EventAction methods or classes to implements the three tasks. I tried to use Clipboard to copy and paste tree node. But I can not copy any tree node from my tree.
Are there any body has sample source code about cut, copy, and paste for tree? If possible, would you mind send me your sample source code to [email protected]
I would appreciate you very very much for your help!!!!
X.G.Hi, Paul Clapham:
Thank you for your quick answer.
I store the node in a DefaultMutableTreeNode variable, and assign it to another DefaultMutableTreeNode variable. I set up two classes (CopyNode and PasteNode). Here they are as follows:
//CopyNode class
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.util.*;
import javax.swing.*;
import javax.swing.tree.*;
import javax.swing.event.*;
public class CopyNode implements ActionListener{
private TreeList jtree;
String treeNodeName;
TreePath currentSelection;
DefaultMutableTreeNode currentNode;
public CopyNode(TreeList t){
jtree = t;
public void actionPerformed(ActionEvent e){
currentSelection = jtree.tree.getSelectionPath();
if(currentSelection != null){
currentNode = (DefaultMutableTreeNode)(currentSelection.getLastPathComponent());
treeNodeName = currentNode.toString();
//PasteNode class
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.util.*;
import javax.swing.*;
import javax.swing.tree.*;
import javax.swing.event.*;
public class PasteNode extends DefaultMutableTreeNode{
private TreeList jtree;
CopyNode copyNode;
public PasteNode(TreeList t){
jtree = t;
copyNode = new CopyNode(t);
public DefaultMutableTreeNode addObject(Object child){
DefaultMutableTreeNode parentNode = null;
TreePath parentPath = jtree.tree.getSelectionPath();
if(parentPath == null){
parentNode = jtree.root;
else{
parentNode = (DefaultMutableTreeNode)parentPath.getLastPathComponent();
return addObject(parentNode, child, true);
public DefaultMutableTreeNode addObject(DefaultMutableTreeNode parent, Object child, boolean shouldBeVisible){
DefaultMutableTreeNode childNode = copyNode.currentNode;
if(parent == null){
parent = jtree.root;
jtree.treemodel.insertNodeInto(childNode, parent, parent.getChildCount());
if(shouldBeVisible){
jtree.tree.scrollPathToVisible(new TreePath(childNode.getPath()));
return childNode;
I used these two classes objects in "actionPerformed(ActionEvent e)" methods in my tree:
//invoke copyNode
copyItem = new JMenuItem("Copy");
copyItem.addActionListener(copyNode);
//invoke pasteNode
pasteItem = new JMenuItem("Paste");
pasteItem.addActionListener(
new ActionListener(){
public void actionPerformed(ActionEvent e){
pasteName.addObject(copyName.treeNodeName);
When I run the drive code, making a copy some node from my tree list, I got bunch of error messages.
Can you figour out what is wrong in my two classes? If you have sample code, would you mind mail me for reference.
Thank you very much in advance.
X.G. -
Drag and drop in tree and grid
Hi all, I have one question on dragging and dropping from grid to/from tree.
In a screen I have one tree and one grid. The following operations need to be performed on this screen.
1. Drag from grid and drop in tree.
2. Drag from tree and drop in grid.
3. Drag from tree and drop in tree itself.
Actually we will add the flavors for every action. Here I am confused in how many flavors I need to take.
What I am taking right now are:
For tree: 3 seperate flavors.
For Grid: 2 seperate flavors.
Can you please advise me on this.
Thanks and Regards,
Balakrishna.NHello,
Try with this programs
BCALV_TEST_GRID_DRAG_DROP
BCALV_TEST_DRAG_DROP_02 -
Error When building ess/tra/tre and ess/tra/tre/trs DC's
I had customized the ess/tra/tre and ess/tra/tre/trs DC's and had them working, but I do not know what I did or what happened that am now getting the following errors when building, can anyone help tell what the problem could be?
Error
- The project was not built since its classpath is incomplete. Cannot find the class file for com.sap.xss.tra.model.openccmodel.OVSOpenCostcenterModel. Fix the classpath then try rebuilding this project.
- HDI_HNS15.02_Desstratresap.com
Error
- This compilation unit indirectly references the missing type com.sap.xss.tra.model.openccmodel.OVSOpenCostcenterModel (typically some required class file is referencing a type outside the classpath)
- InternalVcTreReview.java
- HDI_HNS15.02_Desstratresap.com/gen_wdp/packages/com/sap/xss/tra/tre/vc/review/wdp
- line 0For anyone who might need to know, I managed to fix this by adding tra to the required projects on the build path. On the Navigator View, right click -> Properties -> Java Build Path -> Projects tab -> check dependant project.
Maybe you are looking for
-
Nokia Lumia 1020 power consumption
Hello, On 5th of October 2013 I bought from Vodafone Romania a Nokia Lumia 1020. OS version: 8.0.10328.78. Firmware revision number: 3049.0000.1330.1001. Manufacter Name: RM-875_eu_hungary_298. I'm syncing Microsoft Account daily (contacts only, no e
-
Trouble Connecting to Wifi (tried averything).
My next door neighbour Carl has gone on holiday and he has given me the password to his wifi so I can use it while he is away on my ipod. I see his wifi on my ipod, put the password in and connect successfully. When I try to visit pages it says "Safa
-
How Do I Update iPhoto's Thumbnail/Preview?
Hello, I use a referenced iPhoto library, that is, the photos are NOT kept in iPhoto's database, but simply referenced in their location on my hard drive. If I edit a referenced photo elsewhere, say in Lightroom or Photoshop, and then look at the pho
-
Hi, Does anyone know how to configure funds pre-commitment for PR and funds commitment in PO? Many Thanks.
-
Table difference Totals vs Line Item
Dear SDN, As do not have access to BW / R/3, I would like your help to know what is the difference between total level record vs a line item level record for FI-SL. I would think most of the characteristics and keyfigures are the same for totals and