on 2007 Dec 21 11:24 AM
Hi,
have have a view X. On front of this view, I have a popup window with to buttons. The function of one of them is navigate from the view X to another view.
If I do this using plugs, thows this exception:
"Cannot navigate from view <myview> because it is not part of the current view assembly".
I could do this by some code?
Thanks, but those options doesnt work.
I dont understand about write an event handler. Can you explain it, please?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If find the suggestions by Siva rather strange.
Try this:
Add an event "PopupClosed" and a method "closePopup" in the component controller.
In the action handler of the button that closes the popup, call
wdThis.wdGet<ComponentControllerName>().closePopup();
In this method, close the popup window (store instance in component controller context, map it from other views that need it). After that, fire the event "PopupClosed" to notify the view that wants to navigate. This view must register an event handler for the "PopupClosed" event. In this event handler, call the outbound plug to navigate to the target view.
Armin
Indeed, do as Armin says, if you have problems with popups and their corresponding Event and EventHandler, check this tutorial,
[Ejercicio de Popups|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/42af9f90-0201-0010-6099-ba67e5426bdf] (Pages 18,19,20)
you can activate the FirePlug on the event handler section, once you are back into parent view.
(Gosh i wish i could attach compressed examples here xD)
Regards. Saludos
Julio Herrera
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Are this plugs part of the window which contains the popup.
Regards
Ayyapparaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Francisco,
Create an attribute navigate in view X and controller and pop up (myview). Map them using context mapping.
onAction<button>() in myview
set the attribute navigate to "view2"
in wdDoModifyView() of view X.
{
if(navigate.equalsIgnoreCase("view2"))
wdThis.wdFirePlugOutview2();
}
regards,
Siva
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Francisco,
Here is the solution if and only if the navigation to second view is a must after pop up. Probably this solution may be not wise but it fulfills your requirement. You can use infinite loop at the end of the method where you are calling pop up. Use in view X immediately after calling pop up
for(;;);
{
if(navigate.equalsIgnoreCase("view2"))
{
wdThis.wdFirePlugOutview2();
break;
}
}
regards,
Siva
User | Count |
---|---|
66 | |
10 | |
10 | |
10 | |
10 | |
8 | |
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.