on 09-08-2008 9:53 PM
I have one DC Web dynpro project with multiple web dynpro components. CompA uses CompB. CompA and CompB both have 1 views each. When I show CompB view, can I navigate to CompA using a plug or use CompA by firing an Event ?
Current attempts by me to achieve this have failed. I am thinking may be the CompA has not been initialized yet. Is there any way to initialize CompA from the child CompB?
Yes Vishwas I have 2 applications. 1 starting from parent CompA and the 2nd starting from the child CompB. When I start from the child CompB, I cannot goto CompA by anything I have tried.
Rocío, your suggestion will only work when I start from parent CompA first.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Faraz,
This makes sense now.
The simple reason why you cannot reach from Component B to Component A is that there is no dependency declaration in Component B for Component A. This can't be done as this will result in a cyclic dependency situation.
You may want to use WDURLGenerator API to get an URL for you application assigned to component A to navigate.
Take a look at [this blog|https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/10931] [original link is broken] [original link is broken] [original link is broken];. This will be helpful.
Vishwas.
Hi Faraz:
I don´t know exactly you requirement but you can navigate from iviewA to iviewB and from iviewB to iviewA doing the following:
Navigation from B to A
1- Create an iviewSet in CompA and embeb ivewA and iviewB
2- Go to "Interface view" in your B Component project and open the interfaceIview. Create an outplug in interfaceview in componentB
3- Rebuilt project B and A
4- You now can see de outplug in componentB so you can add a linknavigation to an inplug in componentA
Navigation from A to B I understand you got it.
Hope it helps you.
Rocí
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 David,
Yes the component is not initialized. My problem is slightly different than the thread you gave me. I don't have a problem when I start from a parent component i.e. show a view from CompA and then navigate to a view in child component CompB and back. The problem arises when I start from a view in CompB and want to navigate or fire an event in CompA.
Hi,
If you are using compA in compB then,
In compB's component controller create method say mok and an fire event ,say efireok.In method mok write,
wdThis.wdFireEventEfireok();
First assign view and controller of CompA to Interface controller.
In webdynpro explorer of CompB,you can see Used Webdynpro compnents.There add CompA .
Now if you want comp A to be open in another window,create one window in CompB and add CompA in that window.
Create one event handler on compB's view which handles fire event we created.
This way will work.
Regards
Prajakta
As I said this method only works when I start from the parent component. If I start from the child component and
want to navigate to the parent I get the exception as below,
com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Cannot navigate from view
ChildCompInterfaceView because it is not part of the current view assembly
at com.sap.tc.webdynpro.progmodel.view.View.navigate(View.java:538)
at com.sap.tc.webdynpro.progmodel.view.View.navigate(View.java:462)
at com.child.comp.wdp.InternalChildCompInterfaceView.wdFirePlugGoBack
(InternalChildCompInterfaceView.java:144)
at com.child.comp.ChildCompView.onActiongoBack(ChildCompView.java:143)
at com.child.comp.wdp.InternalChildCompView.wdInvokeEventHandler(InternalChildCompView.java:138)
User | Count |
---|---|
80 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
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.