Skip to Content
0
Former Member
Sep 10, 2007 at 01:35 PM

DropDownByIndex

16 Views

	String[] letters = new String []
	{"A", "B", "C", "D"};
   // Create context elements for the node "X"
<b>   List nodeElements = new ArrayList();</b>	for (int i =  0; i <letters.length; ++i)
	{
	   IPrivateFirst_View.IXElement xElement = wdContext.createXElement();
	   xElement.setY(letters<i>);
	   nodeElements.add(xElement);
	}
   // Bind node element list to the node
	wdContext.nodeX().bind(nodeElements);
   // Set node’s lead selection which determines the selected item
	wdContext.nodeX().setLeadSelection(1);

This is the code I have written for the dropdown box.

But I am getting and error for the line "List nodeElements = new ArrayList();</b> for (int i = 0; i <letters.length; ++i)" saying

"List can not be resolved or is not a type,

Arraylist cannot be resolved or is not a type"

Please help me with this.