on 03-16-2006 8:56 AM
Hello,
I want to create an dynamic Context Element.
The Context-Node Selection existed already.
I has implement the following Code:
IWDNode SelectionNode = wdContext.getChildNode("Selection",0);
IWDNodeInfo SelectionNodeInfo = SelectionNode.getNodeInfo();
SelectionNodeInfo.addAttribute("Test2","ddic:com.sap.dictionary.string");
SelectionNode.getCurrentElement().setAttributeValue("Test2","Hello");
My Problem is, that I become the following failure:
500 Internal Server Error
Web Dynpro Container/SAP J2EE Engine/6.40
Failed to process request. Please contact your system administrator.
The Error must come from the last implement ine,
because without it I didn't become the failure.
Can anybody help me?
I did some tests and the reason for the problem
must be the last line:
SelectionNode.getCurrentElement().setAttributeValue("Test2","Hello");
Because there comes no Error without it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
As far as i think "Selection" is a value node that u might have created dynamically or staticaly. Now with out creating an element of that node u cannot set the value of its attributes.
First create elements of that node:
IWDNodeElement ele = wdContext.getChildNode("Selection",IWDNode.LEAD_SELECTION).createElement();
wdContext.getChildNode(Selection",IWDNode.LEAD_SELECTION).addElement(ele); // add that element.
ele.setAttributeValue("Test2","ABC");
To get a specific element:
wdContext.getChildNode("Selection",IWDNode.LEAD_SELECTION).getElementAt(index); // where 'index' is int field.
Regards,
Piyush.
Patrick,
I hope this link helps you!
http://help.sap.com/saphelp_nw04/helpdata/en/86/16e13d82fcfb34e10000000a114084/content.htm
Regards,
Pavan.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Patrick,
See if this works:
IWDNode SelectionNode = wdContext.getChildNode("Selection",0);
SelectionNode.getNodeInfo().addAttribute("Test2","ddic:com.sap.dictionary.string");
SelectionNode.getCurrentElement().setAttributeValue("Test2","Hello");
Let me know if its working.
Pavan.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Patrik,
As far as I know, this is not the error because of the last lines you have added. That error is because of the J2EE server problem. Please try and restart the server and the try and deploy the application.
You can try and remove these last added lines. If there will be the server problem then this error will again come.:-
<i>500 Internal Server Error
Web Dynpro Container/SAP J2EE Engine/6.40</i>
I hope this helps you.
Regards
Pravesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please post the complete stack trace.
Regards, Anilkumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.