cancel
Showing results for 
Search instead for 
Did you mean: 

Defining component use at runtime?

Former Member
0 Kudos

Hi Developers,

Is it possible to define the component usage at runtime with WD4A ?

I would need to programmatically define or change the COMPONENT ("class" and not interface to use) at runtime.

Then I would create an instance of this component (which I know how to perform).

I would then need to be able to map some controllerinterface context of the newly defined component to my current controllerinterface context.

Does it sounds possible?

Sincerely,

Olivier MATT

Message was edited by:

Olivier Matt

Accepted Solutions (1)

Accepted Solutions (1)

thomas_szcs
Active Contributor
0 Kudos

Hi Oliver,

That's possible. Just let your component usage point to an interface. While creating an instance of a component for this component usage, dynamically specify the actual component to be used. Of course, the component needs to implement the component interface.

Best regards,

Thomas

P.S: There's also the possibility to use ComponentUsageGroups, but this is a highly dynamic thing for which you will lose all workbench support. Hence, it's only advised to use it in very special cases.

Former Member
0 Kudos

Hi Thomas,<br><br>

<blockquote>

Thank you very much for this quick answer. <br>

What do you mean by "<i>you will lose all workbench support</i>" ?<br><br>

</blockquote>

Regards,<br><br>

Olivier MATT

thomas_szcs
Active Contributor
0 Kudos

Hi Oliver,

It just means that you can add the interface view of the used component to your window at design time or define a context mapping at design time, etc. Everything needs to be done dynamically if ComponentUsageGroups were used.

Best regards,

Thomas

Answers (0)