cancel
Showing results for 
Search instead for 
Did you mean: 

Working with popups

Former Member
0 Kudos

Hi all,

How can i display an error message in a popup?

Regards,

Suman

Accepted Solutions (0)

Answers (8)

Answers (8)

Former Member
0 Kudos

yes answered

Former Member
0 Kudos

Hi,

You can use confirmation dialog box to show error message as pop up.

String errorMessage = "This search doesnot exists";

IWDEventHandlerInfo windowHandler = wdControllerAPI.getViewInfo().getViewController().findInEventHandlers("OK");

IWDConfirmationDialog windowDialog = wdComponentAPI.getWindowManager().createConfirmationWindow(dialogText, windowHandler, "OK");

windowDialog.open();

windowDialog.setTitle("Posted Confirmation");

windowDialog.setWindowPosition(250,250);

You need to create a event handler "OK" in the view

Regards

Narendra

Former Member
0 Kudos

Why don't you want to use a MessageArea inside the window where the error occurs?

Armin

Former Member
0 Kudos

Hi,

Can u tell me..which kinda error msgs u want to implement.

if u need simple error messages on pop up.. then u can use validation on web dynpro java coding.

using WDcomponentAPI.getmessagemanager.reportException("Enter proper value",true);

here you can use if statment acc to ur requirement.

if u want error msgs from BAPI u need to capture error msgs from BAPI.

If u want to give eeror msgs on input fields u can use "MessagePool"

One more thing u need to give MessageArea on pop up view to capture msgs.

hpe it hlps

Regards

Khushboo

Former Member
0 Kudos

Hi,

check this Link for pop window

[Creating a Simple Java Web Dynpro Pop-up Window|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/20d2def3-f0ec-2a10-6b80-877a71eccb68]

Thanks & Regards,

Sharma Kvbk

lokesh_kamana
Active Contributor
0 Kudos

Hi,

You can use confirmation dialog box to do this.


String dialogText = "errormessage";
//  Get Event Handler Info
IWDEventHandlerInfo eventHandler = wdControllerAPI.getViewInfo().getViewController().findInEventHandlers("ok");
//  Create the confirmation dialog, with an "ok" button
IWDConfirmationDialog dialog =	wdComponentAPI.getWindowManager().createConfirmationWindow(dialogText, eventHandler, "ok");
dialog.open();
dialog.setTitle("Posted Confirmation");
dialog.setWindowPosition(250,250);

Note :- Create an event handler "ok" in the view.

Replace the string dialog text with ur error message

Thanks & Regards,

Lokesh

Former Member
0 Kudos

Hi,

u need to create a pop up window using IWDWindow interface.(u can get the doc for creating a pop u p window in sdn if u want)

In the view controller of the popup window u can have an error message or wat ever u want using IWDMessage manager.

Regards,

Satya.

Former Member
0 Kudos

Hi,

you need to use a confirmation box here.

Please follow the link below:

http://help.sap.com/saphelp_nw04/helpdata/en/b0/184540631d6f13e10000000a1550b0/content.htm