cancel
Showing results for 
Search instead for 
Did you mean: 

Used DC's

Former Member
0 Kudos

Hi

In developign an Webdynpro application I want to add a Local DC Component CompB to the Root Component CompA. To do this I nagivate to DC MetaData -> DC Definition -> Used DC's -> Add Used DC's (from Context Menu). From here I can navigate the other Local DC's, select them, and add (the full) Dynpro component. My question is whether it is ok to do this or should I navigate to the Public Part under DC Meta Data -> Public Parts and from here only add the Public Part. The fact that the "Finish" Button (to add the selected component and finish) is enabled confuses me.

Thanks

Damien

Accepted Solutions (1)

Accepted Solutions (1)

sanyev
Active Participant
0 Kudos

Hi Damien,

In your case you only need to add DC compB to the used DC's of DC compA. By doing this you will get access to the components in DC compB. To know more about Public Parts read this help document. [http://help.sap.com/saphelp_nw04/helpdata/en/e2/084c16e1e4d545bb94c2bc8379d5f8/frameset.htm]

Sanyev

Former Member
0 Kudos

Thanks Sanyev ..

But under what circumstances do we add the component and likewise when to add the Public Part ?. Does adding the component automatically mean access to "everything" within that component. Is the whole methodology of Public Parts just a "good pratice" i.e. just like an API where the detail of the component is hidden from the developer. What is the difference between the Used DC node in the DC Definition in a local DC and the Used Webdynpro Components under the Component node. Apologies for the bombardment of questions and thanks for the link I plan to read in more detail when I have time.

Thanks

Damien

sanyev
Active Participant
0 Kudos

Hi Damien,

Here is some extract from the book "Inside Webdynpro for Java" by Chris Whealy.

-


A Development Component (DC) has extra metadata associated with it. This metadata is divided into two parts; the DC Definition, and the Public Parts. The DC Definition describes which DCu2019s are required by this DC; and the Public Parts describes which internal objects this DC is going to expose to the outside world.

Once a component is added to a DCu2019s public part, a separate JAR file is constructed to provide access to it. This JAR file must be built using a separate build process known as a u201CDC Buildu201D.

-


For a DC all Interfaces are automatically added to the public part. You can add other components also to the public part if you want to expose them. Like if you are using some user defined data types and you are exposing the interface context which uses the user defined data dictionary types then It is mandatory to add your user defined data types in public part otherwise the person accessing your interface will not have access to them. What I am saying here is you can add data types custom controllers etc to the public part of a DC so that some one using the DC will have access to them.

It has to be noted that if you are adding a DC to your DC's used DC list you will have access only to what ever is there in the public part of the used DC.

Now coming to your used component. Used components are just to say that you will be using such and such components in you current controller. This will help webdynpro in autogeneration of code. You might have noticed when you add a component say compA to the used component list an autogenerated api like wdThis.wdGetCompAController() will be generated. Basically adding a component to your used component list will give you access to that controller. The added component could be from your existing DC or from a different DC. it is just to give access to that controller. But if it is from a different DC then the controller should be there in the public parts.

Let me know if this helped.

Sanyev

Former Member
0 Kudos

Thanks Sanyev

That answered my questions completely .. without Chris Wheeler Java Webdynpro would be a dark art .. the strange thing is that I have this book but have not seen this section, the edition I have is the 2005 one.

Thanks

Damien

sanyev
Active Participant
0 Kudos

Hi Damien,

I have a 2004 edition. He talks about public parts under "General Architecture" section. Page 29 in my edition. Glad that I could help.

Regards,

Sanyev

Answers (0)