cancel
Showing results for 
Search instead for 
Did you mean: 

Confirmation dialg problem

Former Member
0 Kudos

Hi!

I tried to create a confirmation dialog. When a click on the button, the confirmation dialog doesn’t appear correctly. In fact, there is just a square in (- - - - - ) line that appear in the top left corner of the screen.

Here is my code :

//@@begin onActionConfirmActivation(ServerEvent)

compCtrl = wdThis.wdGetConfigurationConsoleCompController();

IWDConfirmationDialog confirm = wdComponentAPI.getWindowManager()

.createConfirmationWindow(compCtrl.getText(ConfigConstant.MSGKEY_CONFIRM_ACTIVATE),

wdControllerAPI.getViewInfo().getViewController().

findInEventHandlers(ON_ACTION_ACTIVATE_NOW),

compCtrl.getText(ConfigConstant.OK));

confirm.addChoice(wdThis.wdGetAPI().getViewInfo().getViewController().

findInEventHandlers(ON_ACTION_CANCEL_CONFIRM),

compCtrl.getText(ConfigConstant.CANCEL));

confirm.open();

//@@end

The two event handler exists.

The result is a square in (- - - - -) line.

Can someone help me?

Thanks!

Alexandre Duquette

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

use this code

IWDControllerInfo controllerInfo =

wdControllerAPI.getViewInfo().getViewController();

String dialogText =<Text>

String dialogOk = "OK"

IWDConfirmationDialog dialog = wdComponentAPI.getWindowManager().createConfirmationWindow(dialogText,controllerInfo.findInEventHandlers("<name of event handler>"),

dialogOk);

dialog.setWindowSize( 10,0);

dialog.open();

Regards,

Saravanan K

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

dialog.setTitle doesn't exist.

I tried the code you gave and the (- - -) box change, but stay in the top left corner of the screen.

regards,

Alexandre Duquette

Former Member
0 Kudos

Hi,

Try

confirm.setTitle("");

Regards

Karthi

Former Member
0 Kudos

the setTitle() method is not recognized.

Regards,

Alexandre Duquette

suresh_krishnamoorthy
Active Contributor
0 Kudos

Hi Alexandre,

Above code is working for me. You mean setTile not exist? see in this WD libraries : <a href="https://media.sdn.sap.com/javadocs/NW04/SPS15/wd/index.html">Here</a>..

Only change u have to do in above code is:

String dialogText = textAccessor.getText(IMessageSample.CONFIRM, new Object[] {values.getText(status)}); =>

String dialogText = textAccessor.getText(IMessageSample.CONFIRM, new Object[] {});

try once ...

Regards

Suresh

Former Member
0 Kudos

are you using NWDS service pack 9(SP9)?

the setTitle() method is not supported by this version. this is only available in SP15.

regards

karthik

Former Member
0 Kudos

i'm using NWDS SP15, deploy on 7.00 SP7 server

Former Member
0 Kudos

Could you try to build your application with a NW04<b>s</b> IDE? Does the problem disappear?

Armin

Former Member
0 Kudos

No error messages appear.

Former Member
0 Kudos

Hi,

Ensure that no window.close or destroy is used. and set the title to ensure something happened

Regards

Saravanan K

suresh_krishnamoorthy
Active Contributor
0 Kudos

Hi Alexander,

Incase if your going to internalization the webdynpro better to save the text message in MessagePool.

Access the message using text accessor and display it.

See this sample code:

IWDTextAccessor textYesAccessor = wdComponentAPI.getTextAccessor();

String tempYes = textYesAccessor.getText(IMessageSample.YES);

IWDTextAccessor textNoAccessor = wdComponentAPI.getTextAccessor();

String tempNo = textNoAccessor.getText(IMessageSample.NO);

IWDTextAccessor textAccessor = wdComponentAPI.getTextAccessor();

String dialogText = textAccessor.getText(IMessageSample.CONFIRM, new Object[] {values.getText(status)});

IWDControllerInfo controllerInfo = wdControllerAPI.getViewInfo().getViewController();

IWDConfirmationDialog dialog = wdComponentAPI.getWindowManager().createConfirmationWindow(dialogText, controllerInfo.findInEventHandlers("onActionOk"), tempYes);

dialog.addChoice(controllerInfo.findInEventHandlers("onActionCancel"), tempNo);

dialog.setWindowSize(500, 50);

dialog.setWindowPosition(WDWindowPos.CENTER);

String confirmText=textAccessor.getText(IMessageSample.CONFIRMATION__DIALOG);

dialog.setTitle(confirmText);

dialog.open();

I hope this will be useful..

Regards

Suresh

Former Member
0 Kudos

the (- - - - (How you say this kind of line in english?) box change but still have nothing else appear.

Former Member
0 Kudos

Hi,

Do you get any error?

Regards

Saravanan K