cancel
Showing results for 
Search instead for 
Did you mean: 

Interfaces to Components

Former Member
0 Kudos

Hello,

I'm currently creating a component that I would like to reuse in other components. I know the way to include this component is via the interface view of the component, but how do I create implementation specific code depending on which component I include the interface in?

For example, I have component X and I want to use X in components A and B. I also have method 1 in component X, but depending on if I include the component in A or B determines what the implementation of method 1 should be. I have not figured out an elegant way to do this yet, and the "Implemented Interfaces" under the component interface looks promising, but I can't get that to work.

I might be entirely off on how I'm developing my overall Web Dynpro application. The idea I'm using is creating a bunch of components to reuse and then consolidating all of the interfaces in one big component and make that the final application. Is this the correct approach?

Thanks,

Dustin

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Dustin,

you can define interfaces at the "Web Dynpro Component Interfaces" node of a WD project via the context menu->"Create Component Interface Definition".

The interface definition includes:

1. The declaration of the interface controller, including Context structure, Events and Methods.

2. Zero to multiple Interface View Definitions with the requested Inbound- and Outbound plugs.

3. Models which should be used by the implementing components.

Interface(s) can be added to the "Implemented Interfaces" of a WD component. Each IFView definition of the interface will be created as a Window in the implementing component, the Component Interface Controller will "inherit" the properties/methods you declared in the interface and the model references will be added to Used Models of the component by the toolset.

It should be possible to do what you want using this great feature.

Hope that helps.

Regards

Stefan

Former Member
0 Kudos

Now it is clear to me how this works. The new test is to see if I can actually design a application the correct way using this feature. Is there plans to have a tutorial to show this feature?

Thanks,

Dustin

Former Member
0 Kudos

Dustin,

Please have a look at "Using Server-Side Eventing in Web Dynpro Components" in the Netweaver help documentation. This might solve your answers.

Regards

Shakeel