Skip to Content
author's profile photo Former Member
Former Member

WebDynpro API Question / Embedding

In my application, I need to embed components dynamically (that is, the component which gets embedded is determined at runtime). I have seen the tutorial example on embedding, but there the component which gets embedded is known at design-time, whereas in my case it is not.

I figure that all components need to share a common component interface (please correct me, if I'm wrong with that). Problem is now, how can I insert the component view into the viewset dynamically? Is there something like an IWDViewset interface, and how can it be retrieved?



Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Oct 15, 2003 at 02:41 PM

    Hello Chris,

    I never tried such a stunt myself, but I would guess that it works (roughly) in the following way:

    The component interface also defines so-called "Interface Views", which are a kind of wrapper for so-called "Windows" of your component. Windows in turn are the hook that holds the whole view composition/assembly.

    Define at least one interface view in your component interface and make every component implementation "implement" that interface view. (Not sure how this works, I would have to try myself).

    Declare in your using component that you embed that interface view of your component interface, just like you would embed any other view. You need to declare a usage of this interface in your view first; that is done in the "Properties" tab of the embedding view, hidden as "Required Controllers". (Of course you need to declare the usage of the component interface also.)

    In your code, use IWDComponentUsage.createComponent(String componentName, String deployableObjectName) to dynamically create an instance of the desired implementation.

    Theoretically, that should be all that is needed. (At least, I hope so.)

    Best regards,


    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.