Can someone advise on how do I retrieve all elements populated into the nodes and attributes at runtime?
The structure of my context is
PartNumbers (singleton node, with cardinality 0..n)
Headers (singleton node, with a supply function)
Items (singleton node, with a supply function)
Value node PartNumbers is a parent node of Headers, which again is the parent node of Items.
Each node has an associated value attribute as a num (PartNum, HeaderNum, and ItemNum)
The relationship between these nodes is like a single PartNum has multiple HeaderNums, and each HeaderNum further has multiple ItemNums.
In order to establish the relationship between the dependent and the independent nodes, I am implementing a supply function for the two dependent nodes (Headers, and Items).
I have got this relationship working and displaying in separate views so far, but I need to have all the PartNumbers, the associated Headers and the Items to be written to a file.
Having used supply functions with a singleton node the content of the node elements (Headers and Items) changes each time the lead selection of the parent node (PartNumbers) changes and as a consequence, I cant get values of all the elements.
Can someone please help?
As you said, since you have declared the inner nodes as singleton, only one instance of those will exist. Each time the parent element gets changed, the supply function will be called and the innernodes will be overwritten.
If you need to get all the generated values of the innernodes, you either need to declare the nodes as non-singleton or go for some workaround method (like creating another non-singleton structure and creating a new element each time the lead selection changes). Please update us if yu get some other solution.