Skip to Content
0
Former Member
Sep 13, 2007 at 12:01 PM

Context iterateElements()

22 Views

Hi experts,

I experience a strange behaviour with my model, the following iterator loop never gets called, despite the fact that "wdContext.nodeFindReturn()" is filled with many elements.

When I set a breakpoint before the loop, and inspect the context via the context debug viewer everything works as expected.

I guess by inspecting the context something in the context changes, which causes the iterator to work, any hints?

wdContext.nodeCustomerList().invalidate();
Iterator iter = wdContext.nodeFindReturn().iterateElements();

while (iter.hasNext())
{
	IWDNodeElement source = (IWDNodeElement) iter.next();
	IWDNodeElement destination = wdContext.nodeCustomerList().createAndAddCustomerListElement();

	WDCopyService.copyCorresponding(source, destination);
}

regards,

christian