on 04-07-2009 12:25 PM
Hello please have a look at my context structure. I need to pass the values to a Web Service. These values will also first appear in disabled input fields on my web dynpro screen. How can i initialize these fields with hard coded values?
Context -
Context
- Buyer Party (Node 0..1)
-- Internal ID (Node 0..1)
-- Internal ID (Attribute String)
- Item (Node 0..1)
-- Price Component ( Node 0..1)
-- Price Speicification Code(Node 0..1)
-- Text (Attribute String)
I just want to initialize the two attributes in above context with initial values (hard Coded) to be sent to a service. How do i write my code in the wdDoInit() method?
Hi Yogesh Bhatia,
Write the code to load the input fields with hard coded values in your view init() method.
First create an element for Buyer party node and add it to Buyer Party node as
IPrivate<view name>.IBuyerPartyNodeElement ele = wdContext.createBuyerPartyNodeElement();
wdContext.nodeBuyerPartyNode().addElement(ele);
ele.setInternalId("internal value");
Make sure you first create element to parent node and then create elements to child nodes.
Thanks & Regards,
Jaya.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jaya,
Thanks for your reply.
I am using exactly the same code as you have mentioned.
However i have not created an element to a parent node. I have directly written the code you have mentioned.
So for example, if i have a parent node to the BuyerParty node also, what changes can i bring to my code to remove the error?
That is how do i create the element for parent node (Please note thta the parent node is not the root node here. BuyerParty has a parent node also)
Thnks
Hi Yogesh Bhatia,
First create the element to the Parent node. Add the element to the corresponding node and then create the element to its child.
Suppose if you have a structure like this:
Context (level 0)
-> A Node (Level 1)
-> B Node (level 2)
-> attribute (level3)
-> C attribute (level2)
-> D Node (level 1)
-> E Node (level 2)
First create element for "A Node" and add it to wdContext.nodeANode().addElement(xxx). and then create element for B Node etc....
I am assuming that the singleton property for all your nodes in true.
Thanks & Regards,
Jaya.
Hi Yogesh Bhatia,
If singleton property is false for a node then add the nodeelement to a parent like this.
wdContext.currentBuyerPartyNodeElement().nodeInternalIdNode().addElement(internalnodelement);
// internalnodelement is the element created for Internal Node
(or)
IPrivateTest123View.IBuyerPartyNodeElement ele = wdContext.createBuyerPartyNodeElement();
wdContext.nodeBuyerPartyNode().addElement(ele);
ele.setInternalId("internal value");
IPrivateTest123View.IInternalIdNodeElement internalNodeEle = wdContext.createInternalIdNodeElement();
ele.nodeInternalIdNode().addElement(internalNodeEle);
Thanks & Regards,
Jaya.
How is the "singleton" property set for these nodes?
Armin
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.