Skip to Content

External Context Mapping


does someone has experience with external context mapping?

My example terminates with 'cannot create nodes, no mapping defined yet', but I do not know how to create the mapping between the inner and the outer component dynamically.



Add comment
10|10000 characters needed characters exceeded

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on May 17, 2004 at 04:42 AM

    Hi Oliver,

    good documentation and an external context mapping example is available here:

    The documentation describes the scenario, if you know the concrete component implementation of inner component at design time already. If this is not the case and that's what you mean with "dynamic external mapping", you can use a component interface to create the desired implementation component at runtime.

    The following sample steps describe how to do that, assuming that all objects reside in the same project (it works with development components also, the procedure is slightly different then):

    1. Create an interface (here "InnerIF") at "Web Dynpro Component Interfaces". Add the desired value node(s) and attribute(s) to the interface controller context of InnerIF. Set the "isInputElement" property of the node(s) to true. Add an interface view to InnerIF, if you want to use the inner component(s) visually later. Rename the generated "Default" inbound plug to "FromOuter" for example.

    2. Declare a component usage of InnerIF in the outer component. Open the context tab of the Interface Controller of the usage and map the nodes to the corresponding nodes in the outer component (the mapping is exactly the same as described in the sample doc, except the fact that you use the interface instead of the component implementation).

    3. Let the necessary inner components implement InnerIF by adding it to the "Implemented Interfaces" of the component interface controllers.

    4. For interface component usages you must create and delete an implementation manually. If the implementation is part of the project of the outer component, you can use <i>usage.createComponent(a.b.c.OuterComponent.class.getName())</i>, else you have to specify the deployable object name too: <i>usage.createComponent(a.b.c.OuterComponent.class.getName(), "local/InnerCompProject");</i> for example.

    Hope that helps.



    Add comment
    10|10000 characters needed characters exceeded