Skip to Content
author's profile photo Former Member
Former Member

Sngleton Property Basics .

Hi Everyone,

I want some one to help me correct my understanding of singleton property of a node. I have a node with sales order no as the only field and a child node as sales item details with 2 or more fields.

Parent Node named as Header_data ( cardinality 0..n, selection o..n, and singleton = YES)

Child node named as Item_data ( cardinality 0..n, selection o..n, and singleton = NO )

Now I have implemented a supply method named get_supply. In this method I have written codes to get the child node data.

The header node is filled during initialisation.

So far I understand what cardinality is, I do understand what selection is, I too understand what supply function is doing. Supply function gets me data in the child node every time my selection of parent node or header data changes.

But when I make the child node singleton property to NO or YES the output appears no different to me. Ideally as per my understanding if singleton property is set to NO of the child node, then when we select multiple Order no. for eg 1001 and 1002, then the item table should be filled with all the item nos in 1001 and 1002 orders respectively. And if singleton set to YES, then only the items of order selected/highlighted first during multiple selection will appear in child node. But if my understanding is correct then my program is not working it shows same result for both singleton property to NO or YES.

And if my understand is wrong, I would appreciate if some one can clarify my doubt using same/ similar example.

Rgds,

Anu.

.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Sep 08, 2009 at 06:39 AM

    Hi Anupama

    Singleton Node:

    A singleton node contains only one instace of the node at runtime. And that instace contains multiple elements at runtime.

    By default if we create a node under ROOT context node, it will be allways singleton true.

    Non singleton node:

    A non singeton node contains more then one node instance at runtime. And each instance contains multiple elements at runtime.

    It is not possible to create NonSingletonNodes directly under ROOT context node. We can create under any node which is under ROOT context node.

    Note: In terms of datastorage at runtime we can say if node is table then each elment of node instance is a row of that table.

    When is it requried to create non singleton nodes?

    For example if you have list of SalesOrders and each and every oder is having list of items. Then we can create this node structure in two ways:

    Orders (singleton true)

    -


    > Items (singleton true)

    Here in this case at any point of time the there will be only one instance of Items node exist for currently selected element of Orders node. And that instance contains multiple elements nothing but items of that order.

    Orders (singleton true)

    -


    > Items (singleton false)

    Here in this case at any point of time all the instances of Items node exist for all the elements(not only for currently selected element) of Orders node. And those instances contains multiple elements nothing but items of those corresponding orders.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.