on 11-19-2008 4:05 AM
Hi,
I saw many threads in the forum but still not able to find answers hence posting it again
I want to have a delete confirmation window on click of a button with simple yes/ no options. If user clicks yes continue with furter lines else just return the function.
I have worked on other technologies and this is very simple in implementation. Why is it too complicated (it seemed from other threads) in webdyn pro java? Many solution posted on other threds have depricated methods in them, and many help links do not open at all
Please help me with Simple way to implement.
Thanks
Harsha Hegde
Hi,
Try this code, its working.......
IWDControllerInfo controllerInfo = wdControllerAPI.getViewInfo().getViewController();
String dialogText = "You really want to delete....";
IWDConfirmationDialog dialog = wdComponentAPI.getWindowManager().createConfirmationWindow(dialogText,controllerInfo.findInEventHandlers("Yes"),"Yes");
dialog.addChoice(controllerInfo.findInEventHandlers("No"),"No");
dialog.show();
and create two eventhandlers with the name "Yes" and "No" and write the code in Events Yes and No as you want.
Regards,
Lakshmi Prasad.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The method createConfirmationWindow(String, IWDEventHandlerInfo, String) from the type IWDWindowManager is deprecated
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Here in my workspace it is not showing as depricated, may be different version.
Better option is try to create new Window -> View with Ok and Cancel buttons and open this window with the following code.
IWDWindowInfo windowinfo = wdComponentAPI.getComponentInfo().findInWindows("ConformWin");
IWDWindow window = wdComponentAPI.getWindowManager().createModalWindow(windowinfo);
window.setWindowPosition(WDWindowPos.CENTER);
window.show();
window.setTitle("Conformation");
window.setWindowPosition(450,100);
wdContext.currentContextElement().setAssemblyWindowId(window);
Create window "ConformWin" with the view "ConView".
This view have "OK" and "Cancel" buttons as you want and onclick of these buttons write the code
Raise the events in this view and write event handlers in the main window.
If you want to implement this way and if you get any queries let us know.
Regards,
Lakshmi prasad.
Hi Harsha,
Try the following code:
IWDEventHandlerId yesAction = IPrivateUpdateSynchLogStatusCompView.WD_EVENTHANDLER_ON_ACTION_A__LOG_OUT_YES;
IWDEventHandlerId noAction = IPrivateUpdateSynchLogStatusCompView.WD_EVENTHANDLER_ON_ACTION_A__LOG_OUT_NO;
String dialogText = "Are you sure you want to Delete ?";
IWDConfirmationDialog dialog = wdComponentAPI.getWindowManager().createConfirmationWindow(dialogText, yesAction, "YES");
dialog.addChoice(noAction, "NO");
dialog.setTitle("Delete Confirmation");
dialog.show();
Remember, to add 2 Actions to the View, one for YES option, and one for NO option, and you can add your piece of code, in the respective actions.
Regards,
Alka.
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 check the link below for the tutorial on how to get the dialog boxes and popup windows.
/docs/DOC-8061#23
Hope it helps.
Cheers,
Manoj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
>
> This too has depricated methods
Hi Harsha,
This is the standard pdf used for confirmation dilog boxes:
Could you please tell which methods are depricated?
Regards,
Anagha
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.