cancel
Showing results for 
Search instead for 
Did you mean: 

Access Parent DC

nikhil_bose
Active Contributor
0 Kudos

How can I access Parent DCs methods in Child DC?

Suppose I have DC1 is been used in DC2. Now, From DC2 I need to execute methods of DC1 or access an Outplug of DC1.

Please give me some idea

thanks in anticipation,

nikhi∟

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Cyclic dependancy is not possible, I have faced the same problem. I solved it by taking out common functions in DC1, in seperate DC which is then used by both DC1 & DC2.

Refer to these links:

/people/sudhir.gorantla4/blog/2008/02/27/componentization-of-webdynpro-application-in-ce71

Regards,

Apurva

nikhil_bose
Active Contributor
0 Kudos

I am not using Parent as Used DC in child. So there is no cyclic dependency as such.

But I need to fire OutPlug() of Parents' Interface controller.

Anyone have any idea??

nikhil_bose
Active Contributor
0 Kudos

thanks for all replies.

Let me be more clear on my requirement.

I am creating a wizard where I have 5 steps. And each step is separate DC/Application. I want to navigate to parent and in between steps inside the wizard.

How can I have a separate DC which is used to all other DCs?

nikhil

Former Member
0 Kudos

Hi i have one doubt all other DC's in same project or not.If it is in same project that specific DC should be put in used DC's .

nikhil_bose
Active Contributor
0 Kudos

each page of wizard is different DC/Application

nikhil

Answers (5)

Answers (5)

Former Member
0 Kudos

I'm with Apurva on this.

Handle the interaction between the DCs in the parent DC (and on the main view).

If required the DC should expose plug and/or events to trigger the navigation.

Former Member
0 Kudos

Hi,

There is one main DC and 5 child DCs, each to be called on seperate steps.

1. Add 5 viewContainerUI elements in main view.

2. Add the views of child DCs in viewContainerUI element

3. Bind visibility of these views to context attribute

4. Write logic for navigation (dynamically changing visibility) in main view.

Regards,

Apurva

nikhil_bose
Active Contributor
0 Kudos

any better idea?

Former Member
0 Kudos

Hi

1.First place the method you want to expose in DC1 interface controller.

2. Expose the interface controller as public part in DC1.

3. Add the public part of Dc1 to Dc2.

4. Now add the InterfaceComponentController of DC1 in DC2 .

5. Now you should be able to access to methods in Dc1 interface controller.

6.to access outbound plug just writ

wdThis.wdget<interfacecontollername>().wdFireplug<outplugname>();

I am new to webdynpro java up to my knowledge i answered the question if it useful give me points

former_member197348
Active Contributor
0 Kudos

Hi Nikhil,

Create a method in Interface controller of DC1. In this method call your DC1 method which you wantto use it in DC2. Open DC2 -> Add usage of DC1 in DC2. Now you can access your DC1's Interface controller's methods in DC2.

Regards

Siva

nikhil_bose
Active Contributor
0 Kudos

hi jhansi & siva,

But is Parents' controller visible in Child?

I am bit confused. Let me clear.

Two DCs: Parent & Child.

Child has a public part and is added under Used Dc of Parent.

Now I want to access Parents' method in Child's controller.

is it possible or am I in wrong approach?

nikhi∟

former_member197348
Active Contributor
0 Kudos

Hi Nikhil,

Actually you should do it in another way. Only Used Dc (child DC in your terms) is accessible in your parent DC but not vice versa. The usage must be one way i.e. If DC1 is added as UsedDC in DC2, then you can not add DC2 as UsedDC in DC1 because it will cause cyclic dependency error.

Regards,

Siva

Former Member
0 Kudos

Hi Nikhil,

If you have a method in the Interface Controller of DC1 then you can access that method in the DC2.

For example if your method in DC1 Interface Controller named getData() then you can access that in the DC2 view as

wdThis.wdGet<InterfaceControllerofDC1>().getData();

But DC1 should be added as a Required controller in DC2 view.

Thanks & Regards,

Jhansi Miryala