on 08-10-2006 2:04 PM
Hello,
I've got a question. I open a window from my main window. In this popup the user can choose something and the push a button. When the user pushes the button, the popup window has to close and a view from the other window has to be shown, not the view from which the popup window was created.
Is this possible?
If i can get my hands on the correct view instance, i can fire a plug but i cant seem to get this.
I already tried to look into <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/a137c339-0b01-0010-a688-a87b88706845">How to Navigate Inside Web Dynpro Component Interface Views</a> but im kinda getting confused there.
Can anyone help me out?
Much thanks,
Hugo Hendriks
Hi,
If u r using portal to display the iView then,
In the popup Close action just write an event to open the desired view in the main window, provided ur initial view and the target view that u r expecting should be inside the same window.
OnActionClose
{
//Close the window.
wdportalEventing.fire("<namespace>","<description>","");
}
In the target view
init()
{
wdportalEventing.subscribe("<namespace>","<description>",<create an action and then call>);
}
If u r not using portal then,
Try with Component controller eventing.
-Rathna.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rathna,
Im not using a portal. I dont know if its possible but is there something like in Java Swing where u can create a listener and subscribe a component. Then i can fire an event from the subscriped component to let the other one know something happened.
That i can use to let the detail view know, the popup is done and then the detail view can destroy the popup and navigate back to the masterview.
Is this possible? To create a listener in a view for a window and fire an event from the window?
Im new webdynpro so im still trying to figure out how it works...sorry for all the questions.
thx
Hugo
Hi,
Below the codes of destroying the popup window, write the code to fire the plug to next view. so you can see the other view would be placed there instead of that first view.
regards
karthik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I would like to fire the plug but i need the correct view instance for that. I tried getting this by looking for it through the window but it doesnt work. I tried something like this:
wdContext.currentContextElement().getCurrentPopup().destroy();
IWDWindowInfo apWindowInfo = (IWDWindowInfo) wdComponentAPI.getComponentInfo().findInWindows("APWindow");
IWDViewUsageInfo viewInfo = apWindowInfo.getViewUsageByID("taskDetailsView");
TaskDetailsView view = (TaskDetailsView)viewInfo.getView();
view.firePlugToMainView();
regard,
Hugo
Ok...to be more specific.
I have a MainWindow with a 2 views in it. A master and a detail view. When im in the detail view and the user clicks a button a new window is created as a popup in this manner:
IWDWindowInfo windowInfo = (IWDWindowInfo) wdComponentAPI.getComponentInfo().findInWindows("ExecutePopupWindow");
IWDWindow popup = wdComponentAPI.getWindowManager().createWindow(windowInfo, true);
popup.setWindowPosition(300, 150);
popup.setWindowSize(300, 600);
popup.setTitle("Execute");
popup.open();
wdContext.currentContextElement().setCurrentPopup(popup);
In the popup...several buttons are generated but every action behind those buttons have to result into the closing of the window and returning to the other window's master view. (When i close the popupwindow the details view is visible)
I tried somehting like:
public void onActionCancel(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
{
//@@begin onActionCancel(ServerEvent)
wdContext.currentContextElement().getCurrentPopup().destroy();
IWDWindowInfo apWindowInfo = (IWDWindowInfo) wdComponentAPI.getComponentInfo().findInWindows("APWindow");
IWDViewUsageInfo viewInfo = apWindowInfo.getViewUsageByID("taskDetailsView");
TaskDetailsView view = (TaskDetailsView)viewInfo.getView();
view.firePlugToMainView();
//@@end
}
Hope it is more clear now.
thanks in advance,
Hugo
Hi,
Do the same thing Find the view is in which window and
call the this window as u called this current pop-up window.
Regards,
Vijayakhanna Raman
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 | |
10 | |
10 | |
10 | |
7 | |
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.