on 08-08-2006 2:53 PM
Hi!
I tried to create a confirmation dialog. When a click on the button, the confirmation dialog doesnt 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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
No error messages appear.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
the (- - - - (How you say this kind of line in english?) box change but still have nothing else appear.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.