on 01-30-2009 12:53 PM
Hi
I created web dynpro application.In that input fields,drop down box,checkbox are present.
By activating Checkbox,it has to pop-up one screen which was already developed
please tell in what way i have o proceed to achieve that.
please provide step by step document.
Thanks & Regards
Sushma
tx
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sushma,
1.Create a checkbox UI element.
2.Create a context of type boolean.
3.assign the context with checked property of checkBox.
4. Create a action at onToggle event
5. Now in the action you have created write the code for pop up window.for that follow the below link which has explained each step in detail.
Hope this will help
Regards
Narendra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Narendra,
I have got a similar requirement but it is a bit more complex. I want the popup screen by clicking a radiobutton in a ESS iView. I have customised the iviews of ESS using NWDS and want to know the porcess of displaying a pop-up window when the user selects a radio button. Could you give me some advise over this. I would appreciate your help.
By the way, the link that you have metioned in the above post doesn't seem to be working!!
Regards,
PG.
Hi Sushma,
You have to create a seperate Window and view for the popup. Embed the popup view in the newly created window and then give the Window name instead of PopWin in the code.
IWDWindowInfo windowInfo = (IWDWindowInfo)wdComponentAPI.getComponentInfo().findInWindows("PopWin");
IWDWindow window = wdComponentAPI.getWindowManager().createModalWindow(windowInfo);
window.setWindowPosition (300, 150);
window.show();
wdContext.currentPopupNodeElement().setPopupAttribute(window);
Better to write this piece of code in your component controller and create the PopupAttribute in your component controller context.
Use this code to close the popup window
wdContext.currentPopupNodeElement().getPopupAttribute().hide();
Regards,
Sanyev
Hi
I created a popup window and embed a view.I written required code(in which popup window screen should be) in the pop-up window.
wdContext.currentPopUpElement().setUserloginid("001157");
wdContext.currentPopUpElement().setExistingUser(true);
wdContext.currentPopUpElement().setUserName("Sushma");
wdContext.currentPopUpElement().setActive(true);
wdContext.currentPopUpElement().setEmployee("1");
wdContext.currentPopUpElement().setRole("3");
Here i mapped each element in thee context.
I add the code in the component controller context .
In that i created context ---"PopUpWin".under that attribute "Existing User".
.
In the Component controller Interface implementation i written code
public void wdDoInit()
{
//@@begin wdDoInit()
IWDWindowInfo windowInfo = (IWDWindowInfo)wdComponentAPI.getComponentInfo().findInWindows("EtrecPopUpwin");
IWDWindow window = wdComponentAPI.getWindowManager().createModalWindow(windowInfo);
window.setWindowPosition (300, 150);
window.show();
wdContext.currentPopupWinElement().setExistingUser(window);
wdContext.currentPopupWinElement().getExistingUser().hide();
//@@end
}
iam getting error in last two lines.
Is it correct the way i was proceed.Please guide me where i went wrong.
"""""After activating Existing user checkbox button the pop up window has to come""""""""
Thanks & Regards
Sushma
sushma,
posting error trace will help to identify the error easily.
if there is design time issue: change ExistingUser attribute type to IWDWindow (java native type)
wdContext.currentPopupWinElement().getExistingUser().destroyInstance();// to destory/hide
If you are getting Nullpointer exception at runtime, make PopupWin node cardinality as 1 .. 1 ; this means PopupWin element exists at runtime at once and only once.
comment: further elements can't be added to node PopupWin
Hi Sushma,
What you have done in the wdDoInit() of the component controller is wrong. What you are doing there is on launch of the application itself you are showing the screen and then hiding it.
If I understand your requirement correctly you need to popup a screen when someone checks a checkbox.
So first of all for the checkbox create an action called checkBoxClicked.
implementation would look some thing like this
//This is on the main view controller
public void onActionCheckedBoxClicked(){
/*
Write code to do business logic
*/
//Launch popup window
wdThis.wdGetComponentController().showPopup();
}
In your component controller context directly under Root create an attribute "popupWindow" of type IWDWindow.
Root(node)
--popupWindow(attribute)
create a method in your component controller for showing the popup
public void showPopup(){
IWDWindowInfo windowInfo =
(IWDWindowInfo)wdComponentAPI.getComponentInfo().findInWindows("PopWin");
IWDWindow window = wdComponentAPI.getWindowManager().createModalWindow(windowInfo);
window.setWindowPosition (300, 150);
window.show();
wdContext.currentRootElement().setpopupWindow(window);
}
Similarly create one more method in your component controller to hide the popup window.
public void hidePopup(){
IWDWindow window = wdContext.currentRootElement().getpopupWindow();
window.hide();
}
Finally in your popup window view there should be some way to close the popup. Assuming it is a button "Close".
In the action handler for the button close call the hidePopup() method of the component controller.
//This is on the popup view controller
public void onActionCloseButtonClicked(){
//close popup window
wdThis.wdGetComponentController().hidePopup();
}
Hope this helps.
Regards,
Sanyev
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
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.