cancel
Showing results for 
Search instead for 
Did you mean: 

Message display in popup window

Former Member
0 Kudos

Hi experts,

I need to display an error message when the field is empty in popup window. send me the code pls.

reg

kiruba

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

hi Siva,

Thanks a lot.I got the result.

Kiruba

Former Member
0 Kudos

Hi,

use the following code,

if(wdContext.currentContextElement().get<Attribute>()==null){

IWDControllerInfo coninfo =

wdControllerAPI.getViewInfo().getViewController();

IWDConfirmationDialog dialog =

wdComponentAPI.getWindowManager().createConfirmationWindow(

"Input is required.",

coninfo.findInEventHandlers("Ok"),

"Ok");

dialog.open();

}

define one event handler with name 'Ok'

Regards,

ramesh

Former Member
0 Kudos

Hi,

First you need to create an event Handler say name as Ok. Then you can use the following code:

IWDConfirmationDialog cWin =wdComponentAPI.getWindowManage().createConfirmationWindow( <Error Message>,wdThis.wdGetAPI().getViewInfo().getViewController().findInEventHandlers("Ok"),"Ok");

cWin.open();

You can use the following code based upon the condition to populate the text in the popup window.

Hope this may help you.

Nelly

Edited by: nelly khare on Sep 22, 2008 1:28 PM

Former Member
0 Kudos

Hi,

First you can create event handler go to method tab then click tab button then choose event handler name is ok finally press ok

					IWDControllerInfo controllerInfo =
								wdControllerAPI.getViewInfo().getViewController();
							String first =
								"<put it your error message>";
			
							IWDConfirmationDialog dialog =
								wdComponentAPI.getWindowManager().createConfirmationWindow(
									first,
									controllerInfo.findInEventHandlers("ok"),
									"ok");
			
							dialog.open();

Regards,

P.Manivannan.

former_member197348
Active Contributor
0 Kudos

Hi,

if(error condition)

//e.g if(wdContext.current<node>element().get<attribute>()==null )

{

wdComponentAPI.getMessageManager().reportException("errorMessage", false);

}

Former Member
0 Kudos

Hi Siva,

I need to display the error mesg in popup window.

Kiruba

former_member197348
Active Contributor
0 Kudos

Hi Kiruba,

Try these 2 options.

1.Create a MessageArea UIElement in the popup window and try.

If it doesn't work then

2. Try to hide (i.e. setting visible property of the view to WDVisibility.NONE) the main window.

Let me know if still there is any issue.

Regards,

Siva