Hi All
I am trying to open a modal window from within a FOR loop, then process an action on that view and destroy the window instance. The modal window opens again on the next pass through the loop. The modal windows displays different data depending on attributes set in the context.
Here is the code:
for (int i = 0; i < 3; i++) { IPrivateTestPopupView.IDataNodeElement data = (IPrivateTestPopupView.IDataNodeElement) wdContext.nodeDataNode().createDataNodeElement(); data.setEmployeeNumber("Employee " + i); data.setAge(i + "0"); wdContext.nodeDataNode().addElement(data); wdContext.currentContextElement().setIterator(i); IWDWindowInfo windowInfo = (IWDWindowInfo)wdComponentAPI.getComponentInfo().findInWindows("TestPopupWindow"); IWDWindow window = wdComponentAPI.getWindowManager().createModalWindow( windowInfo ); window.setWindowPosition(300, 150); window.show(); wdContext.currentContextElement().setWindowInstance(window); }
My problem is that the FOR loop seems to run through entirely to the end before opening the modal window. Thus my modal window only displays the data where the iterator = 2.
Is there any way I can get the FOR loop to stop until the modal window is destroyed and then continue processing?
Thanks in advance
Anton Kruse