on 12-13-2007 8:02 AM
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
Hi,
"Is there any way I can get the FOR loop to stop until the modal window is destroyed and then continue processing?"
I think no,
Regards
Ayyapparaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
When you are opening a window, then there must be a action(Button) which will close it. OnAction of this button destroy the window and set a boolean attribute in your context to true. Inside your for loop check if this attr is true then only ityerate to the next index.
Hope this will solve your problem.
thanks & regards,
Manoj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I don't think you can open multiple modal windows because modal window requires user action to return to calling/parent application, so until you close the first window you can't open the 2nd.
Regards,
Omri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.