on 2008 Oct 22 4:50 PM
I Created a IWDwindow, when i close it, the window does not get closed completely leaving a tiny small area on the screen, as it's modal, i cant do anything else. anyone know why?
here's how i create the IWDWindow
try {
IWDWindowInfo windowInfo = (IWDWindowInfo)wdComponentAPI.getComponentInfo().findInWindows("ErrorPopupWin");
IWDWindow window = this.wdComponentAPI.getWindowManager().createModalWindow(windowInfo);
wdContext.currentContextElement().setErrorWindowInstance(window);
window.setWindowPosition(WDWindowPos.CENTER);
window.show();
Thread.sleep(100);
} catch (InterruptedException e) {
e.printStackTrace();
}
and here's how i close it
wdContext.currentContextElement().getErrorWindowInstance().destroyInstance();
Request clarification before answering.
i find out when this is happening, but still dont know why.
i put this create window method in my Controller.
if the view call this method, the pop up disappear perfectly
but when it's called within the controller, when it get closed, it left a tiny little area on the screen.
any advice?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try the following code..It will help you
********This is to create the window******************************
//@@begin showPopup()
IWDWindowInfo windowInfo = (IWDWindowInfo)wdComponentAPI.getComponentInfo().findInWindows("WindowName");
// create the u201CWindowu201D
IWDWindow window = wdComponentAPI.getWindowManager().createModalWindow(windowInfo);
// set the WindowPosition on the screen
window.setWindowPosition(25, 25);
// and show the window
window.show();
// Save WindowInstance in Context
wdContext.currentGroupPopupElement().setWindowInstance(window);
***********This is to destroy the window****************
IWDWindow window = wdContext.currentGroupPopupElement().getWindowInstance();
window.destroyInstance(); //Destroy the window instance
Regards
Padma N
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
For a modal window you can try the following code with the position and the size modifications as per your requrement:
creating a window
IWDWindowInfo windowInfo = (IWDWindowInfo) wdComponentAPI.getComponentInfo().findInWindows("Window Name");
IWDWindow window = wdComponentAPI.getWindowManager().createModalWindow(windowInfo);
window.setWindowSize(300,300);
window.show();
wdContext.current<Node Name>Element().setWindowInstance(window);
for destroying window intance
WDWindow window = wdContext.current<Node Name>Element().getWindowInstance();
window.destroyInstance();
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
you can even try this code.
This works fine for me. May be this will help you also.
IWDWindowInfo info = wdComponentAPI.getComponentInfo().findInWindows("PopUpWindow");
IWDWindow window = wdComponentAPI.getWindowManager().createWindow(info , true);
window.setWindowPosition(WDWindowPos.CENTER);
wdContext.currentContextElement().setVa_win(window);
window.open();
Thanx.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
What is that sleep delay for. It should work fine without any problem as your code seems to be good. Just try removing that sleep statement and give it a try.
Regards,
Murtuza
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
30 | |
10 | |
8 | |
8 | |
7 | |
7 | |
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.