on 09-08-2006 4:46 PM
Hi Guru,
I have following structure
like
Context
A--
B--
C--
D--
E--
The cardinality has came automatically.
i wrote code like this
A a = new A(),
wdContext.nodeA().bind(a);
B b = new B();
a.setOder_B(b);-------> B instance
C c = new C();
a.setOrder_C(c)-------> here passing object showing up Abstract list object.
But c not abstract list object it instance of C.
how can bind or set C and D nods to root node A.
I tried like b.setmat("sss")
then a.addB(b);
Its not working could you please tell me how to bind 0..n cardinality node. any type casting for abstract list...
its little bit urgent
Hi Ramana,
You may have your context setup wrong to do this. It should look like this
Context -
>ZBAPI_DATA (0,n)
ZBAPI_DATA --->HeaderData (0,1)
ZBAPI_DATA --->Item_Data (0,n)
ZBAPI_DATA --->customer.....
ZBAPI_DATA --->.....
I think you get the idea. ... then you can do somthing like this
Collection itemLinesArray = new ArrayList();
IPrivateApplicationView.IItem_DataElement item_DataElement;
item_DataElement = wdContext.createItem_DataElement();
item_DataElement.setSomeValue("value");
itemLinesArray.add(itemLinesElement);
item_DataElement = wdContext.createItem_DataElement();
item_DataElement.setSomeValue("value2");
itemLinesArray.add(itemLinesElement);
wdContext.nodeItem_Data().bind(itemLinesArray);
This isnt the only way to do this you can also use the api which should have an addElement(int, object); but its really no different than binding an arraylist.
- Roger
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
77 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
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.