cancel
Showing results for 
Search instead for 
Did you mean: 

How to use one DC's view/component/appln in another DC

Former Member
0 Kudos

Hi All,

I am new to DC concept. I am trying to use one DC's component in another DC. I have done following steps.

a)Created two DCs A and B

b) DC A's 'New Public Part-->Entity Type(Web Dynnpro Component) I selected component

c) Add Used DC in B, I added A's component

<b> From this point onwards I am not getting any clues</b>. How do I call A's component in DC B. <i>Please guide. Any examples will be great.</i>

Thanks and Regards,

Ganga.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi All,

I am using 2 DC child & parent DC. I am using child view into parent view.

Now In parent view i created one button "go to child", onclick it shows child view.In child view i created one button "go to parent".

Now tell me how to come back fron child view to parent view.

Thanks & Regards,

Jyoti

Edited by: JyotiLagad on Jun 11, 2011 6:19 AM

Former Member
0 Kudos

Hi Gangadharaya,

Just tell me do u want to display a view, use some context or use some methods defined in other controller.

So that i can help you in the same direction.

<b>Component Usage</b>

Suppose you have following scenario:

1) DC2 has component Comp2. In this dc you read the context a value and stores it in context named "Ctx_value".

2) DC1 has component Comp1. Here you want to read the Ctx_value from comp2.

In Comp2 create a method getValue()

public java.lang.String getProcessId( )

{

return wdContext.getCurrentElement().getAttributeValue("Ctx_value");

}

In the interface controller of Comp2 click on properties tab and add reference to the cont2 controller. Now create a method here in interface controller to get the value of Ctx_value

public java.lang.String getValue( )

{

return wdThis.wdGetComp2Controller().getValue();

}

Expose the Comp2 as public part now.

In DC1 add DC1 as used DC.

Build both dc's

In Comp1 create Component usage by name Comp2Usage to Comp2.

Now you can access the method getValue() from interface controller of Comp2.

wdThis.wdGetComp2UsageInterface().getValue();

This is how you can access a value of Context. Same can be done by direct binding.

<b>View Access</b>

If you want to access a view v2 in comp2 then goto windows in comp1 and embedd an existing view and in that select the interface view of comp2. The default view in comp2 can now be displayed in comp1.

Regards,

Murtuza

Message was edited by:

Murtuza Kharodawala

Former Member
0 Kudos

Hi Murtuza,

Thanks for your reply. But I am not able to access method in the interface controller. I strictly followed your steps. Please guide me. Some docs will of great help.

Thanks and Regards,

Ganga.

Former Member
0 Kudos

Hi Gangadharayya,

I am not having any doc or link with me right now. But tell me are you not able to access the method in the interface controller of the same component or that of the other.

Also, once you define the method save your metadata then you would see that method in interface controller and hope you have followed all the steps mentioned in previous reply.

Regards,

Murtuza

null