Skip to Content
0
Former Member
Jun 03, 2005 at 04:08 PM

Create singleton node elements dynamically

19 Views

Hi,

Need to create singleton node elements at runtime. At design time I have defined NodeB as child of NodeA. NodeB is singleton, and as such I dont get the typed access code to create elements of NodeB using code as shown below.

IPrivateProjectManagerView.IPlantsElement plantsElement = wdContext.createPlantsElement();

plantsElement.setName(currentPlant);

wdContext.nodePlants().addElement(plantsElement);

//Add current plant to the Plants node

IPrivateProjectManagerView.IPlantNode plantNode = plantsElement.nodePlant();

IPrivateProjectManagerView.IPlantElement plantElement = plantNode.createPlantElement();

//plantElement.setName(currentPlant);

plantNode.addElement(plantElement);

//add Avail Check field to current plant

IPrivateProjectManagerView.IAvailCheckNode availCheckNode = plantElement.nodeAvailCheck();

IPrivateProjectManagerView.IAvailCheckElement availCheckElement = availCheckNode.createAvailCheckElement();

availCheckNode.addElement(availCheckElement);

IPrivateProjectManagerView.IAvailCheckSetNode availCheckSetNode = availCheckElement.nodeAvailCheckSet();

IPrivateProjectManagerView.IAvailCheckSetElement availCheckSetElement = availCheckSetNode.createAvailCheckSetElement();

availCheckSetNode.addElement(availCheckSetElement);

In the above case AvailCheck is non-singleton child node.

Do let me know what the code is for creating node element NodeB, and its child node element say NodeB1.

Thanks !

Sri