on 02-11-2009 12:04 PM
Hi,
I open an application url using the below code.
IWDWindow win = wdComponentAPI.getWindowManager().createNonModalExternalWindow(urlToTargetApp,"External");
win.show();
New windows keep opeing as an when the action with above code is invoked.I need to restrict so that the already open window ( first time opened window) is used to launch subsequest url..
Any idea on how to do this..
Ashok
This behaviour cant be changed.ie they open in different windows each time.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ashok,
IWDWindow interface does not allow you to use the same window to go to another external website. You will have to destroy the existing window and open a new one.
IWDWindow win = wdContext.currentContextElement().getWindow();
if(win != null){
win.destroyInstance() ;
}
win = wdComponentAPI.getWindowManager().createNonModalExternalWindow(urlToTargetApp,"External");
win.setWindowPosition(200, 200);
win.show();
wdContext.currentContextElement().setWindow(win);
This will basically destroy the previous window and open a new window. At any point of time only one external window will be open.
Regards,
Sanyev
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ashok,
Let me explain you further.
Say you have a method onClickOpenWindow() in which you have written the code for opening the window.
Now declare a boolean golbal variable say isWindowOpen =false;
Now in method onClickOpenWindow() make the boolean isWindowOpen= true;
now you have to wiite one condition like in method onClickOpenWindow()
if(isWindowOpen){
window.close();
}
So by this will call the close window method only when the button is clicked means only when already a window is open.
Hope this will help.revert if you require more info
Regards
Narendra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ashok,
I think what you require is not possible.
But what you can do is in the method where you opne the new window write the code for closing the window.
So if the user clicks it one more time it will first close the window and then open new window.
Hope this will help.
Regards
Narendra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.