Skip to Content
Former Member
Jul 09, 2007 at 01:51 PM

External Context Mapping


Can someone help me out with this situation:

1 - I have a parent component that defines a component interface in its public part

2 - I have a number of child components that implement the interface

3 - The child components are created dynamically using the IWDComponentUsage.createComponent(componentname, dcname)

4 - The parent has a context node and 2 attributes that are mapped to a node of the same name/seup defined in the context of the interface that is implemented by the children

5 - The child components set the node and attribute values on init and are mapped to their respective interface controller's context

I am trying to implement a test component that provides a test harness and interface, that allows individual tests to be plugged in dynamically. The tests implement an interface and are loaded dynamicaly at runtime. I want each test to supply its id/display name via external context mapping so the list of active tests can be displayed before the test suite is executed.

I assumed that when I called createComponent() for one or more child components, I would automatically have one element created per component under the parent's context node. At the moment I cant see any elements under this node. Can someone explain what I am doing wrong?

Is external context mapping with loosely coupled components possible?

Also can someone explain why I would use an interface method with parameters rather than an interface method that uses a mapped context?