on 09-26-2008 5:54 AM
Hi ,
I am very new to WebDynpro Java.
Can somebody plz help me??
My Requirement-
On Click of the Save Button ,a Pop Up window should get displayed with a message saying "SUCCESSFULLY SAVED".
Plz reply soon
Thanks In advance!!
Regards
Smita
Hi Smitha,
Use the following code after doing the save operation on click of button. For this you need to create one event handler (here in example it is: Ok) also.
IWDConfirmationDialog cWin =wdComponentAPI.getWindowManager().createConfirmationWindow("Skills added successfully.",wdThis.wdGetAPI().getViewInfo().getViewController().findInEventHandlers("Ok"),"Ok");
cWin.open();
Here cWin.open() will open the popup window.
Skills added successfully will be text which you want to display.
Hope this may help you.
Nelly
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
just we have to create Ok event handler,
IWDConfirmationDialog dialog = wdComponentAPI.getWindowManager().createConfirmationWindow(
"Success",
coninfo.findInEventHandlers("Ok"),
"Ok");
if you observe the popup code, findInEventHandlers("Ok") will call the event handler with name Ok when user press the "Ok" in pop up.
hope you got it.
Regards,
ramesh
hi!
1.create a action on the button click
2.create a value node(popup)--> value attribute
set the cardinallity as 1..1 and type as com.sap.tc.webdynpro.
services.session.api.IWDWindow
3.
public void okPopup() {
// @@begin okPopup()
// get the repository content at runtime of the Web-Dynpro-
IWDWindowInfo windowInfo = (IWDWindowInfo) wdComponentAPI
.getComponentInfo().findInWindows("okWindow");//give your window name
// create the u201CokWindowu201D
IWDWindow window = wdComponentAPI.getWindowManager()
.createModalWindow(windowInfo);
// set the WindowPosition on the screen
window.setWindowPosition(300, 150);
// and show the window
window.show();
// Save WindowInstance in Context
wdContext.currentPopupElement().setWindowInstance(window);
// @@end
}
4.now you can take text views to show the required message in the popup window.for that you can take the message from message pool and also you can directly write the message in the text property of text view.
please get back to me if any further clarification is required.
thanks
vishal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
This code will solve ur problem.
IWDControllerInfor controllerInfo=wdControllerAPI.getViewInfo().getViewController();
String dialogText = "Successfully Saved";
IWDConfirmationDialog dialog = wdComponentAPI.getWindowManager().createConfirmationWindow(dialogText,controllerInfo.findInEventHandlers("ok"),"ok");
dialog.open();
Regards,
Sunaina Reddy T
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
If you want a popup to have options save or exit then
you need to have two event handlers
1) Create two event handlers Ok,close under methods tap select eventhandler radio button.
2)In action button you write the following code
IWDControllerInfo cntrl_info = wdControllerAPI.getViewInfo().getViewController();
IWDConfirmationDialog confirm = wdComponentAPI.getWindowManager().createConfirmationWindow("You are going to Exit, Want to Proceed?", cntrl_info.findInEventHandlers("cancel"),"Cancel");
confirm.addChoice(cntrl_info.findInEventHandlers"ok"),"Confirm");
confirm.setWindowSize(250,100); confirm.setWindowPosition(100,100);
confirm.show();
3) In "ok" method in implementation you write your code to save.
Regards
RAghu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
This code will solve ur problem.
IWDControllerInfor controllerInfo=wdControllerAPI.getViewInfo().getViewController();
String dialogText = "Successfully Saved";
IWDConfirmationDialog dialog = wdComponentAPI.getWindowManager().createConfirmationWindow(dialogText,controllerInfo.findInEventHandlers("ok"),"ok");
Regards,
Sunaina Reddy T
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Go through this link and see Creating Dialog Boxes,It will help you
/docs/DOC-8061#23
Regards
Padma N
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Smita,
1. Create an event in your view named OK.
2. Put this code in method for the event on SAVE button.
IWDEventHandlerInfo eventhadler = wdThis.wdGetAPI().getViewInfo().getViewController().findInEventHandlers("Ok");
IWDConfirmationDialog confirmwindow =wdComponentAPI.getWindowManager().createConfirmationWindow("Successfully Saved.",eventhandler,"Ok");
confirmwindow.open();
Regards,
Murtuza Kharodawala
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
refer this doc.very helpful.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.