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 nodes 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.