on 08-10-2004 7:31 PM
Hello,
I have created following context-nodes, representing master-detail data:
ParentElement (cardinality=0..n, singleton=true)
-
id (Attrbute)
-
ChildElement(cardinality=0..n, singleton=false)
-
name (string Attribute)
-
value (string Attrbute)
I have created 2 tables in order to show master and it's detail data. So far so good.
Now my problem: i initialize context with some data, and this data is shown in my master + detail tables!
But if i change detail-data in detail-table, the context doesn't change it old values. Have somebody exprienced the same problem? I mean the data is shown, but cannot be edited.
With best regards
Michael Belenki
Hi Michael,
no this should work. Assume a singleton value node "Master" with attributes Id and Name on root level of the context and Master having a non singleton child value node "Detail" with attributes DetailId and DetailName, then after filling in wdDoInit():
IPrivate<YourView>.IMasterNode mNode = wdContext.nodeMaster();
for (int ix = 0; ix < 10; ix++) {
IPrivate<YourView>.IMasterElement mel = mNode.createMasterElement();
mNode.addElement(mel);
mel.setId(ix);
mel.setName("Master " + ix);
for (int jx = 0; jx < 5; jx++) {
IPrivate<YourView>.IDetailElement del = mel.nodeDetail().createDetailElement();
mel.nodeDetail().addElement(del);
del.setDetailId(ix * 10 + jx);
del.setDetailName("Detail " + ix * 10 + jx);
}
}
and binding the master table's dataSource to node "Master" and the detail's table dataSource to node "Master.Detail" the entries in the detail table are editable (using Inputfields of course).
Hope that helps.
Best regards
Stefan
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 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.