cancel
Showing results for 
Search instead for 
Did you mean: 

Duplicate usage of view

Former Member
0 Kudos

Hi

I have a view with 2 ViewContainerElements band I want both of them to contain the <b>same view</b> with <b>different</b> data.

When I did so I get the following error:

com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: duplicate usage of view .SomeInnerView

Is there any workaround? Why it is impossible to reuse a view? I understand that the proper way to do this would be to reuse the whole component, but this view has a very strong connection with other views in the component. They share model and data, so I have no reason to split it to the different component.

Thanks in advanse,

Victor.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Victor,

Short answer -- no.

Long answer: you are right, try to extract common functionality in separate component. Typically you will end up with component that defines input context node for data and visual interface stuff (window & view). You can still keep connection with other parts via context mapping.

Regards,

VS

Former Member
0 Kudos

Hi,

Thanks for answer.

Can you please point to any documentation to check this issue deeply?

I am also interesting what is the overhead of cross-component call?

Regards,

Victor.

thomas_chadzelek
Participant
0 Kudos

Hello,

the idea is that "component" is the unit of reuse, while "view" is a singleton within its component instance.

The (runtime) overhead of creating a component should be relatively low.

In your case, you probably need "external mapping" which allows the data to live in the outer components context (component or custom controller). The mapping then lets the data be used by the two instances of the inner component.

Bye,

Thomas

Answers (1)

Answers (1)

Former Member
0 Kudos

Victor,

Did you find a solution for your problem?

What exactly is meant by "external mapping" as suggested by Thomas Chadzelek?

Did you manage to implement this?

Thanks,

Dina