on 12-31-2004 2:48 PM
Hello!
I want controller of a popup window be initialized every time when the window is opened. Is that possible?
I've defined Lifespan for the view "when_visible", but doInit is called only first time, the window was opened.
Of course, I could invalidate context on closing the window (as I manage to fire event, that the window can be closed), but may be there is a simple way to make lifespan working similar to "normal" views?
Thank you!
Best regards,
Nick
Hi nick,
What kind of popup window do you want(Confirmation dialog,External, or a regular popup)?
-wael
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Wael,
I'm not pretty sure about terminology, I think I'm using "regular popup", though I'm doing similar things to Tutorial 10 "Dialog Boxes in Web Dynpro":
- define a new window and a view in WD component
- open the window using
IWDWindowInfo windowInfo = (IWDWindowInfo)wdComponentAPI.getComponentInfo().findInWindows(NAME);
IWDWindow window = wdComponentAPI.getWindowManager().createWindow( windowInfo, true);
window.setWindowPosition(WDWindowPos.CENTER);
window.open();
- save the window instance in context of the current view
- Define an event in controller
- add event processor to the current view to close popup window by
IWDWindow window = wdContext.currentContextElement().getPopupWindowInstance();
window.close();
- popup window triggers the event in controller and 'parent' view closes the popup.
Best regards,
Nick
Hallo Nick,
call <b>window.destroy()</b> instead of <b>window.close()</b>. Calling the close-method does not destroy the affected view controllers because the window is only closed but not destroyed. It's just invisible at the moment. Consquently the hook-method <i>wdDoInit()</i> is not called again by the Web Dynpro Runtime.
Greetings, Bertram
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
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.