on 03-04-2010 7:58 AM
Hi,
Can anyone please help me in, when I trigger a button I need to display a popup which contains a table.
Thanks in Advance,
Radha.
Edited by: AnuradhaSiddabathuni on Mar 4, 2010 1:29 PM
Hello Radha,
Try this...
1. Create a new window say "PopUpTableWin"
2. Create a new View with the table you want to display in popup, say "PopUpTableView"
3. Add view to Window
You can open the window by using:
IWDWindowInfo windowinfo = (IWDWindowInfo)wdComponentAPI.getComponentInfo().findInWindows("PopUpTableWin")
IWDWindow popupWindow = wdComponentAPI.getWindowManager().createWindow( windowinfo, true)
popupWindow.setWindowPosition(WDWindowPos.CENTER);
popupWindow.setTitle("Order Search");
popupWindow.open();
This above code will help you in opening the popup window.
Create a method in component controller say openTablePopup() and call the method in your action.
Say, if the WebDynpro Component name is "MainComp", component controller name will be MainCompController.
You can call the method in component controller this way:
wdThis.wdGetMainCompController().openTablePopup(),
This way you can open the window as popup. If you want to transfer some data from popup window to the parent view, map the attributes in PopupTableView to Component controller's context and from Component Controller's context map to Parent view
Best regards,
Chinnu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Chinnu,
I am getting the following error while I was implementing the process you have specified
com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Parameter windowInfo must not be null.
at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.createModalWindow(ClientComponent.java:1028)
at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.createWindow(ClientComponent.java:1020)
at com.sap.approval.Approval.TablePopup(Approval.java:199)
at com.sap.approval.wdp.InternalApproval.TablePopup(InternalApproval.java:238)
at com.sap.approval.ApprovalView.onActionDetails(ApprovalView.java:148)
have specified.
Thanks,
Radha.
Hello Anuradha,
You can do the same by creating a view containing the table and embed that view in another window.
Once that is done you can call the window onAction of that button.
Say, for e.g:
TableView is the view you want to display which is embeded into TableWin
ParentView is the main view which is embeded in MainWin.
Then,
onAction of ParentView, call TableWin like this:
WDWindowInfo windowInfo = wdComponentAPI.getComponentInfo().findInWindows("TableWin");
IWDWindow Window = wdComponentAPI.getWindowManager().createModalWindow(windowInfo);
Window.show();
Refer [Dialog Boxes in Web Dynpro Applications|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/user-interface-technology/wd%20java/wdjava%20archive/dialog%20boxes%20in%20web%20dynpro%20applications.pdf] for more details
Abhinav
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
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.