Hi, I have recently migrated few custom web dynpro java components from 7.0 to 7.3 release, as part of the migration and under new programming model some changes has happened as per this cheat sheet
I have successfully migrated but there is some issue where some DC's share their context nodes and attributes with other DCs. In the old programming model (7.0) interface controller has been used to expose component controller nodes, attributes and methods. Then is perfectly fine under old programming model.
However, with the new programming model interface controller has been moved under local component interface and there is not much I can do there to expose context of component controller. Here is my scenario and please advice what is the best way to resolve under new programming model 7.3
I have two DCs comp-A and DC comp-B, I would like to use(share) some of Comp-A controller component context nodes, attributes and methods to Comp-B. How do I do it? Comp-A and Comp-B are completely independant Web Dynpro DCs, Comp-B is NOT a child DC of Comp-A.
I have tried following
1) Create new Component interface definition (CID) and added to public part(PP), but I cannot map component controller context to this CID. I can only create new nodes and attributes in CID and then map CID context node to the component Controller, but with this approach I'm getting nullpointerexception with message as follows
Caused by: java.lang.NullPointerException: while trying to invoke the method com.xx.yy.wd.comp.xxx.wdp.IPublicXXXComp$IPersonDtlsElement.setCphone(java.lang.String) of an object returned from com.xx.yy.wd.comp.reg.wdp.IPublicXXXComp$IContextNode.currentPersonDtlsElement()
The programming code that throws above exception is
wdContext.currentPersonDtlsElement().setCphone(someClass.getValue()); // Where PersonDtls is the node at CID mapped to the component controller context, PersonDtls is null so unable to invoke any method like "setCPhone"
In the old programming model (i.e. 7.0) we could map component controller context to the interface controller and easily expose the interface controller when you create PP of component controller. In the new programming model I couldn't use local interface contoller.
2) Add Comp-A component controller to the public part, and in comp-B assign Comp-A as dependency but then I don't see any context nodes or attribues of comp-A in comp-B.