cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding Cardinality

Former Member
0 Kudos

Hi,

While declaring a value node , the cardinality is by default 0..n .While designing pop ups it is being changed to 1..1 for window instance .

Can anybody tell me exactly in which case it will be 1..n and 0..1 .

Thanks a lot .

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

HI Jain

0..n / 0..1 You will not have an element under the context where you can store the data ,If you want to use then you need to create an element explicitly for the node using create and addElement() method.

If you set the cardinality to 1..n WebDynpro Frame Work will create one element for you.

Cardinality

-


Any node or attribute that has the context root node as its immediate parent, is known as an independent node or attribute.

Any node or attribute that has some other node as its immediate parent, is known as a dependent node or attribute.

All context nodes are collections.

A node collection is composed of elements, where an element is an aggregation of the node’s immediate children (attributes and/or other nodes).

The cardinality property controls the number of elements a node collection may hold at runtime.

Every context node has a property called Cardinality. This property is composed of two values that

taken together, describe the maximum and minimum number of elements the node collection may hold

at runtime.

Cardinality Minimum: 0 or 1

Cardinality Maximum: 1 or n

Therefore, there are four possible cardinality values (specified as <Min>..<Max>)

0..1 Zero or one elements permitted

0..n Zero or more elements permitted

1..1 One and only one element permitted

1..n One or more elements permitted

Best Regards

Chaitanya.A

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi

X..X

The first part of the cardinality describes the minimum number of elements that node's element collection may contain

this can be either <b>0 or 1</b> , and is stored as <b>BOOLEAN</b> value. you can obtain this value at runtime using the method

<b><your node>.getNodeInfo().isMandatory();</b>

The second part describes the maximum number of elements that node's element collection may contain. this value is either <b>1 or an n</b> and is stored as BOOLEAN

<b>(false=1,true=n)</b>

this value can be obtained at runtime using the method

<b><your node>.getNodeInfo.isMultiple();</b>

Warm Regards

Chaitanya.A

former_member485701
Active Participant
0 Kudos

Hi,

Like if you have input field , in that case if you are binding it with the value node then you need cardinality as 1:1/1:n.

The reason is that it will create an element always for you so that you can give some input in this element.

If you set the cardinality to 0:1/0:n then it will disable the inputfield and user will not be able

to enter the data.

Feel free to ask queries.

Regards,

Praveen