Current Position:Home > Problems with external context mapping

Problems with external context mapping

Update:10-11Source: network consolidation
Advertisement
Hi ,
I am having the following problems with external context mapping from one WD component to another.
Problem description:
In the <i>Component Interfaces</i> I have defined a WD interface "InfA".
In the <i>interface controller</i> of this compoenent,I have ContextA and attributeA(cardinality 1..1).The contextA is marked as an "Input Element".
Now my webdynpro componentB adds InfA as used component.In componentB I decalre a contextB with attributeB and map it to contextA to set up the external context mapping.
Now I expect that if any webdynpro component implements this WD interface InfA ,he has access to contextA with the data getting filled from contextB.
After i have created the component for the used component I try to fill values in the source node contextB thru this code:
wdContext.currentContextB.setB(value);
But in the runtime I keep getting error nullPointerException for nodeContextB,suggesting that the mapping has not been completed.
Can anyone suggest due to what the error can come ,and, if its a webdynpro bug ,is there a workaround??
Thanks in advance for your help.
Best regards
Sourav

The Best Answer

Advertisement
HI,
Valery : I personally checked  by doing the example, if the names of value attribute are different in the child's interface and parents component controller then it throws the exception.
Sourav: NullPointer Exception is thrown when something is not properly initialised, if in the main component the cardinality of mapped origin is 1.1 then you need to access it element directly like:
wdContext.currentParentNodeElement().setFname("Abhijeet");
    wdContext.currentParentNodeElement().setLname("M");
i will suggest just check out if you are declaring some element of value node and without initialising taking its use or what?
if this doesnt solve your problem, please post the expanded exception.
hope it helps
let me know if you face nay problem
regards
  • Problems with external context mapping Update:10-11

    Hi , I am having the following problems with external context mapping from one WD component to another. Problem description: In the <i>Component Interfaces</i> I have defined a WD interface "InfA". In the <i>interface controlle

  • External context mapping problem Update:10-11

    Hi, I am trying to create a sample application for external context mapping 1. I created a webdynpro project. 2. In that project i created  2 web dynpro components PrComp and ChComp.  3. In the ChComp Interface controller context created a node Mappe

  • Error in external context mapping Update:10-11

    Hi I want to send some data to a used web dynpro DC from the embedding DC. I tried using external context mapping by performing the below steps. created a value node and attribute at interface controller of the used DC set isInitial property to true