on 03-31-2008 4:51 PM
Hi,
I am developing an application on NWDS 7.1.
In the application a main window displays a modal window on some user action. When the user closes the modal window, the main window does not get displayed. Only a blank is shown. I can see the main window only on refresh the screen.
Do I need to add any extra code for 7.1?
Regards,
Rahul
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
I understand you are using a modal window, hence you must have created another window which will act as the modal window. Now in the main window(view of the window), you may have a button which will create a modal window. This button will be in the view of the main window. Now add the code int he method in the component controller. and call this method in the onActionCreateModalWindow action created in the view of the main window. :
First declare,
//@@begin others
IWDWindow modalWindow;
//@@end
Then
public void createModalWindow( )
{
//@@begin createModalWindow()
//creating the window
IWDWindowInfo winInfo = wdComponentAPI.getComponentInfo().findInWindows("NewPopWindow");
modalWindow = wdComponentAPI.getWindowManager().createModalWindow(winInfo);
//display window in centre
modalWindow.setWindowPosition(WDWindowPos.CENTER);
modalWindow.setTitle("Modal Window");
modalWindow.setWindowSize(400,100);
//opening the window
modalWindow.show();
//@@end
}
Now, create a button in the view of the modal window. Say Back(to return to the main window).Add the coding in the method created int he component controller and call this method, in the onActionBack method in the view of the modal window.:
public void destroyModalWindow( )
{
//@@begin destroyModalWindow()
modalWindow.destroyInstance();
//@@end
}
regards,
pinki
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No, you don't need extra code. What are you doing in the action handler for the close button?
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Armin,
In the close button's action I trigger an event
wdThis.wdGetApptCompController().onApptConfirmDeleteEvent(true, status);
In the event handler I have the following code:
IWDWindow confirmDeleteWindow = wdContext.currentPopUpElement().getApptConfirmDeleteWindow();
confirmDeleteWindow.destroyInstance();
Regards,
Rahul
User | Count |
---|---|
86 | |
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.