cancel
Showing results for 
Search instead for 
Did you mean: 

Help for wdContext.getNodeInfo().addChild() needed

Former Member
0 Kudos

Hello

I'm trying to migrate a tutorial for NW2004 to the actual version.

Of course I have to deal with deprecated methods, such as

IWDNodeInfo addChild( java.lang.String name,
java.lang.Class elementClass,
boolean singleton,
boolean mandatory,
boolean multiple,
boolean mandatorySelection,
boolean multipleSelection,
boolean initializeLeadSelection,
java.lang.String dataType,
IWDNodeCollectionSupplier supplier,
IWDNodeCollectionDisposer disposer)

which has been substituted by

 IWDNodeInfo addChild(String name,
                     Class elementClass,
                     boolean singleton,
                     CMICardinality collection,
                     CMICardinality selection,
                     boolean initializeLeadSelection,
                     IStructure structure)

I now have to transfer

IWDNodeInfo node = wdContext.getNodeInfo().addChild(
"DynamicNode",
null,
true,
true,
false,
false,
false,
true,
null,
null,
null);

to the newer, non-deprecated method. How do I do this?

Regards

Michael

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

You have:


addChild("DynamicNode",null,
true, /* singleton */
true, /* mandatory */
false, /* multiple */
false, /* mand. selection */
false, /* multiple selection */
true, /* init. lead-selection */ 
null, null, null);

With the new API this should become this one


addChild("DynamicNode",null, 
true, 
CMICardinality.ONE, /* at least one and not multiple = 1:1 */
CMICardinality.ZERO_TO_ONE, /* no lower bound and not multiple = 0:1 */
true, null);

Armin

Former Member
0 Kudos

😘

Thank you

Answers (0)