on 01-15-2009 1:30 PM
Hi,
I'm having a problem using nested nodes in Web DynPro. Consider the following context:
L Person
L Data
L Totals
The context is filled with data by calling a bapi. There are two scenario's for the application, one which should only display the output for one person, and one where the output contains data of all the persons in a team.
Every person has elements in Data, but for some Totals doesn't exist. When I execute this for one person, there is no problem. But when I do it for a team, with some persons having a Totals table and others not, the persons which shouldn't have a Totals table all get the same table belonging to another person.
I've made all my context nodes non-singletons and the minimum selection and minimum cardinality is 0 for the node Totals.
wdContext.currentPersonElement().nodeTotals()
should return null sometimes but it never does ...
Any idea?
I am not sure if I understand your problem correctly but with the following context structure
Person (node, c=0:n)
-- Data (node, c=0:n, singleton=false)
-- Totals (node, c=0:n, singleton=false)
you can access the totals for the person at index 3 using the following code
IPersonElement person = wdContext.nodePerson().getPersonElementAt(3);
ITotals totals = person.nodeTotals();
if (totals.size() == 0)
{
/* no totals for this person */
}
else
{
for (int i = 0; i < totals.size(); ++i)
{
ITotalsElement total = totals.getTotalsElementAt(i);
}
}
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 |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.