on 06-05-2009 10:01 AM
Hi,
We are converting our existing WD 2004 applications towards a new SAP 7.1 system. We are aware that some conceptual changes occured for this new stack.
Based on presentations from SAP it seems that the 7.1 stack is theoratically backward compatible with the previous WD runtimes and that seems to be right ...
We imported our old projects in the new CE studio and got them deployed with some manual fixing here and there ...
We are however still facing an issue with the dynamic context code ... The application dumps at a view which is being created fully-dynamically based upon meta data available in a dynamical created context node. The meta data node is created in the controllers context - then when the view is instantiated a dynamical 'mapped context node' is created.
At this point the WD dumps with the following issue:
com.sap.tc.webdynpro.progmodel.context.ContextConfigurationException: NodeInfo(path=<obscured>/<obscured>.TranslationDataHolder, class=com.sap.tc.webdynpro.progmodel.context.MappedNodeInfo): mapping to NodeInfo(path=<obscured>/<obscured>.TranslationDataHolder, class=com.sap.tc.webdynpro.progmodel.context.DataNodeInfo) is impossible, the node expects a model class holding com.sap.tc.webdynpro.progmodel.context.DataNodeInfo
Here is an extract of the code:
// Reset all our dynamic stuff wdContext.getContext().reset(false); // Get our controller node IWDNodeInfo wControllerNode = wdThis .wdGetTranslationToolController() .wdGetContext() .getNodeInfo() .getChild( TranslationTool.cNodeNameTranslationData); // Check we have it if (wControllerNode != null) { // Create a local node ( depreciated apparently so replaced with below code ) // IWDNodeInfo wLocalNode = // wdContext.getContext().getRootNodeInfo().addMappedChild( // wControllerNode.getName(), // wControllerNode.getClass(), // true, // wControllerNode.isMandatorySelection(), // wControllerNode.isMultipleSelection(), // null, // true, // true); IWDNodeInfo wLocalNode = wdContext.getContext().getRootNodeInfo().addMappedChild( wControllerNode.getName(), wControllerNode.getClass(), com.sap.tc.cmi.metadata.CMICardinality.ONE, null, true, true); // When ok if (wLocalNode != null) { // And set mapping wLocalNode.setMapping(wControllerNode, true); // DUMPS HERE // Add get our attributes wLocalNode.addAttributesFromDataNode(); } }
I have been looking for some DataNodeInfo interface to replace the IWDNodeInfo but no luck so far ... Looking at the most up to date JAVA documentation it still seems that the IWDNodeInfo should be used so I am a bit in the dark what the complaint is about ...
Anyone any suggestions or ideas ?
Thanks,
Steven
FYI - An update and solution on this issue from the SAP Developers - I can confirm this works now:
The attached code for the view <x> has a problem in the
method addMappedChild. The second parameter (elementClass) expects the
model class in case of a model node, but you passed the class of the
node itself. It seems that this parameter is not used (and thus not
checked) at all in 6.40 and 7.0, but there is a use in 7.1 now.
Please change the addMappedChild and pass null for the second parameter
elementClass. This is interpreted as "don't care and accept what the
origin has". This is exactly the behaviour of 7.0.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So far for a proper working editor huh ... whatever I do edit wise I can't get it properly formatted ...
so here we go again:
At this point the WD dumps with the following issue:
com.sap.tc.webdynpro.progmodel.context.ContextConfigurationException: NodeInfo(path=<obscured>/<obscured>.TranslationDataHolder, class=com.sap.tc.webdynpro.progmodel.context.MappedNodeInfo): mapping to NodeInfo(path=<obscured>/<obscured>.TranslationDataHolder, class=com.sap.tc.webdynpro.progmodel.context.DataNodeInfo) is impossible, the node expects a model class holding com.sap.tc.webdynpro.progmodel.context.DataNodeInfo
// Reset all our dynamic stuff
wdContext.getContext().reset(false);
// Get our controller node
IWDNodeInfo wControllerNode =
wdThis
.wdGetTranslationToolController()
.wdGetContext()
.getNodeInfo()
.getChild(
TranslationTool.cNodeNameTranslationData);
// Check we have it
if (wControllerNode != null)
{
// Create a local node ( depreciated apparently so replaced with below code )
// IWDNodeInfo wLocalNode =
// wdContext.getContext().getRootNodeInfo().addMappedChild(
// wControllerNode.getName(),
// wControllerNode.getClass(),
// true,
// wControllerNode.isMandatorySelection(),
// wControllerNode.isMultipleSelection(),
// null,
// true,
// true);
IWDNodeInfo wLocalNode =
wdContext.getContext().getRootNodeInfo().addMappedChild(
wControllerNode.getName(),
wControllerNode.getClass(),
com.sap.tc.cmi.metadata.CMICardinality.ONE,
null,
true,
true);
// When ok
if (wLocalNode != null)
{
// And set mapping
wLocalNode.setMapping(wControllerNode, true); // DUMPS HERE
// Add get our attributes
wLocalNode.addAttributesFromDataNode();
}
}
I have been looking for some DataNodeInfo interface to replace the IWDNodeInfo but no luck so far ... Looking at the most up to date JAVA documentation it still seems that the IWDNodeInfo should be used so I am a bit in the dark what the complaint is about ...
Anyone any suggestions or ideas ?
Edited by: Desaeger Steven on Jun 5, 2009 11:09 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Charan,
The controller node is also dynamically created and does not reference a model
Here is the extract of the controller node creation:
wNodeInfo =
wdContext.getNodeInfo().addChild(
cNodeNameTranslationData,
null,
true,
com.sap.tc.cmi.metadata.CMICardinality.MANY,
com.sap.tc.cmi.metadata.CMICardinality.ONE,
true,
null);
Further on attributes are assigned
// Travel over the metadata
for (int i = 0; i < wNodeMeta.size(); i++)
{
// Code removed here
// Get an element
// Add attribute using the path as id
wNodeInfo.addAttribute(
wMetaElement.getPath(),
"ddic:com.sap.dictionary.string");
}
Regards,
Steven
Hi,
As per the api: ContextConfigurationException occurs- when some of these properties are inconsistent (e. g. root node is not singleton)
Check that you are setting all the properties properly while calling addMappedChild mehtod.
See this link
http://www.petsounds.org/sapjavadocs/webdynpro/com/sap/tc/webdynpro/progmodel/api/IWDNodeInfo.html
Regards,
Charan
Hi Charan,
Thanks for the suggestions ... I do believe though that my settings are correct as it works fine on the 2004 stack ...
It seems to be a more deeper issue with the webdynpro framework - the context node types 'data' and 'model' merged together into this new 'universal' type ... maybe that's driving this underlying issue ...
I created a service message with SAP for this one ... will see what they respond.
Thanks for your help so far though,
Steven
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.