Skip to Content
avatar image
Former Member

Questions about embedding component interfaces


I want to embedd several views with the same interface in my window.

Only one view is visible at the same time and which view should be determined dynamically.

So I created a Component Interface with some methods in component interface controller and a Interface View Definition (named ITaskInterfaceDefinition). Every component I want to embed implements this interface.

I can embed the ITaskInterfaceDefinition in my Mainview like every other view. But now I dont know how to create an instance of the component? How to assign the component as implementing unit for the embedded ITaskInterfaceDefinition?

thx in advance


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Apr 04, 2007 at 06:38 PM

    Hi Thomas,

    Let assume you have declared ITaskInterfaceDefinition as <b>Required Controllers</b> and component which implements ITaskInterfaceDefinition has name ""

    IWDComponentUsage usage = wdThis.wdGetITaskInterfaceDefinitionComponentUsage(); 
    if (!usage.hasActiveComponent()){ 
    	}catch(WDRuntimeException e){
    		//handle exception

    Best regards, Maksim Rashchynski.

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 04, 2007 at 06:56 PM

    Hi Thomas,

    In my opinion, you have to create a WD component to each View that you wish to use in the winodwmain component. Each WD component will have its view.

    Following these steps bellow:

    1 - In the main component, add all others components that you have created, in "add Used Component";

    2 - In the Window, embed the interface view of a component instance, for all views.

    3 - Create a plugin navigation between the views.

    4 - In the main code, use the following code to control the instantiation and navigation:

    IWDComponentUsage component =

    wdThis.wdGet<<your component>>InstComponentUsage();


    wdThis.wdFirePlug<<your navigation>>();

    That is your requirement?



    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 07, 2007 at 08:32 AM

    Thank you both very much! Of course points to you guys!

    I think the first answer was exactly the hint I was looking for. Embed only one Interface and create the Components in my code. If I have 20 views with the same interface I can embed only one interface and use some mapping to create the components.

    One additional question. In my interface view definition (in the Component Interface), which I embed as visual part of my component I defined several inbound plugs.

    These inbound plugs result in window inbound plugs in the implementing component. How do I map these window plugs to my inbound plugs of the views inside my component?

    Add comment
    10|10000 characters needed characters exceeded