Skip to Content
avatar image
Former Member

Context Sharing between two External Components in WebDynpro

Hello All,

I am having difficulties in trying to set the value I get from the context of DC 1 into a mapped context attribute of DC 2. DC 1 is being shared as a Used Component to DC2, I have added the Interface for the DC1 to its Public Part.

I am even able to get the mapped attribute through the exposed interface of the DC1, but when I try to set the attribute through my code, I get a Null Pointer Exception.

I have not the done the binding explicitly, I thought the mapping would take care of this. Do I need to explicitly bind the attribute too?

Regards,

Shakul.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Sep 30, 2008 at 08:53 AM

    Hi Shakul,

    You do not need to explicitly map the context.

    The exception NullPointerException suggests that you are using a node for which the instance is not created.

    Try to map a Root Level context 1st.

    -Ashutosh

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 30, 2008 at 04:06 PM

    Hi Shakul,

    Could you please give us the line number that is causing null pointer exception and the structure of the context that you are trying to map.

    Regards,

    Murtuza

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 01, 2008 at 03:38 AM

    Hello Murtaza,

    the context structure is really simple, because I wanted to test it before actually doing it in my component.

    I have a context node which has cardinality 1..1 and its InputElement property has been set to true. This node just has boolean type attribute .

    I am successfully able to share my context structure, but the problem arises when I try to get some value from it in the Parent DC. In the parent DC, I can access the value that I shared through the Child DC's reference i.e. I can get the value through code.

    But I want the value to be reflected in the Parent DC since I have mapped the two nodes.

    I think I have to explicitly create the Component Usage of the Child DC and set the binding too. Could you advise how to proceed further?

    Regards,

    Shakul.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 01, 2008 at 05:31 AM
    Add comment
    10|10000 characters needed characters exceeded