cancel
Showing results for 
Search instead for 
Did you mean: 

Delate Confirmation window :(

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

former_member205363
Contributor
0 Kudos

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.

Answers (3)

Answers (3)

Former Member
0 Kudos

The method createConfirmationWindow(String, IWDEventHandlerInfo, String) from the type IWDWindowManager is deprecated

former_member205363
Contributor
0 Kudos

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.

Former Member
0 Kudos

Hi Harsha,

It does not show as deprecated to me.

Regards,

Anagha

Former Member
0 Kudos

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.

Former Member
0 Kudos

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

Former Member
0 Kudos

This too has depricated methods

Former Member
0 Kudos

>

> This too has depricated methods

Hi Harsha,

This is the standard pdf used for confirmation dilog boxes:

https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/903fed0d-7be4-2a10-cd96-91367073...

Could you please tell which methods are depricated?

Regards,

Anagha