Skip to Content
author's profile photo
Former Member

singleton

Hi

I understand the functionlaity of singleton nodes..

i have a context like

NODE1...(0..n) S= false

++NODE2... (0...n) S = false.

in the UI ..i have one table corresponding to NODE1 and other table corresponding to NODE2.

so whenever a record in table1 is selected corresponding records should be displayed in table 2 ( using supply function attached to node2)

here even though NODE1 and NODE2 both do not have the singleton property checked..still the desired functionlaity of reading the records based on selected record in table 1 is working.

Even after checking the singleton node for both NODE1 and NODE2 functionality does not change...

my question is then what is the exact functionality of that singleton checkbox

Edited by: Tarang Shah on May 3, 2011 4:40 PM

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • author's profile photo
    Former Member
    Posted on May 03, 2011 at 11:40 AM

    HI Tarang,

    Singleton Node:

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

    Non Singleton Node:

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

    What I understand from the above definitions is that, a Non Singleton node will have instances for each of the elements in the parent node.

    Where as, if the node is a singleton node, then the node will have instances for only the lead selected element of the parent node.

    I would guess the reason you are not finding the difference in your scenario is because you are allowing only single selection(1:1 or 0:1)...If the selection is single-selection, then irrespective of the element choosen and the singleton property, the number of instances of the child node will always be 1 because you cannot select more than one element of the parent node.

    My understanding might not be perfect...Experts please correct me if I am wrong.

    Thanks,

    Aditya.

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on May 03, 2011 at 12:06 PM

    Hi

    >

    > I understand the functionlaity of singleton nodes..

    >

    > i have a context like

    >

    > NODE1...(0..n) S= false

    > ++NODE2... (0...n) S = false.

    >

    >

    > in the UI ..i have one table corresponding to NODE1 and other table corresponding to NODE2.

    >

    > so whenever a record in table1 is selected corresponding records should be displayed in table 2 ( using supply function attached to node2)

    >

    > here even though NODE1 and NODE2 both do not have the singleton property checked..still the desired functionlaity of reading the records based on selected record in table 1 is working.

    >

    > Even after checking the singleton node for both NODE1 and NODE2 functionality does not change...

    >

    > my question is then what is the exact functionality of that singleton checkbox

    >

    > Edited by: Tarang Shah on May 3, 2011 4:40 PM

    I understand your genuine doubt on this.

    here even though NODE1 and NODE2 both do not have the singleton property checked..still the desired functionlaity of reading the records based on selected record in table 1 is working.

    It is working as because the node-2 is filled simultaneously when node-1 is filled. You do that by calling function module or class methods.

    You can have a supply function without having the node as singleton.

    Singleton is kind of lazy loading. you load the data when it is really needed for the presentation.

    In the above scenario you have

    for every node_1 element node_2 is available.

    In singleton scenario you have only one node-2 at any time.

    Add comment
    10|10000 characters needed characters exceeded