on 04-16-2007 1:24 PM
hi friend
i am getting Error while dynamically crating context attributes for the View Controller!!
please she the Error log an dmy code and suggest the needful.
Root Cause
The initial exception that caused the request to fail, was:
<b> com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Cannot find repository information for component usage ddic:com (Hint: Does a component usage of that name really exist?)</b>
at com.sap.tc.webdynpro.progmodel.controller.Component.createComponentUsage(Component.java:815)
at com.sap.tc.webdynpro.progmodel.controller.Component.getComponentUsageInternal(Component.java:467)
at com.sap.tc.webdynpro.progmodel.controller.Component.getMappableContext(Component.java:414)
at com.sap.tc.webdynpro.progmodel.context.MappedAttributeInfo.initAttributeMapping(MappedAttributeInfo.java:308)
at com.sap.tc.webdynpro.progmodel.context.MappedAttributeInfo.init(MappedAttributeInfo.java:267)
... 38 more
See full exception chain for details.
System Environment
Client
Web Dynpro Client Type HTML Client
User agent Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3
Version null
DOM version null
Client Type ns7
Client Type Profile nn7
ActiveX disabled
Cookies enabled
Frames enabled
Java Applets enabled
JavaScript enabled
Tables enabled
VB Script enabled
Server
Web Dynpro Runtime Vendor: SAP, build ID: 7.0007.20060331081328.0000 (release=645_VAL_REL, buildtime=2006-03-31:06:24:04[UTC], changelist=396896, host=pwdfm101), build date: Thu Dec 14 13:40:09 IST 2006
J2EE Engine No information available
Java VM Java HotSpot(TM) Server VM, version:1.4.2_11-b06, vendor: Sun Microsystems Inc.
Operating system Windows XP, version: 5.1, architecture: x86
Session & Other
Session Locale en_US
Time of Failure Mon Apr 16 17:50:46 IST 2007 (Java Time: 1176726046896)
Web Dynpro Code Generation Infos
local/Test
SapDictionaryGenerationCore 7.0006.20051128142640.0000 (release=645_VAL_REL, buildtime=2006-01-14:14:59:42[UTC], changelist=378068, host=PWDFM101.wdf.sap.corp)
SapDictionaryGenerationTemplates (unknown)
SapGenerationFrameworkCore 7.0006.20050713144242.0000 (release=645_VAL_REL, buildtime=2006-01-14:14:48:59[UTC], changelist=357697, host=PWDFM101.wdf.sap.corp)
SapIdeWebDynproCheckLayer 7.0006.20051128151834.0000 (release=645_VAL_REL, buildtime=2006-01-14:15:05:10[UTC], changelist=378108, host=PWDFM101.wdf.sap.corp)
SapMetamodelCommon 7.0006.20050929162929.0000 (release=645_VAL_REL, buildtime=2006-01-14:14:49:45[UTC], changelist=369752, host=PWDFM101.wdf.sap.corp)
SapMetamodelCore 7.0006.20050929162929.0000 (release=645_VAL_REL, buildtime=2006-01-14:14:49:38[UTC], changelist=369752, host=PWDFM101.wdf.sap.corp)
SapMetamodelDictionary 7.0006.20051128142655.0000 (release=645_VAL_REL, buildtime=2006-01-14:14:57:39[UTC], changelist=378069, host=PWDFM101.wdf.sap.corp)
SapMetamodelWebDynpro 7.0006.20051128151854.0000 (release=645_VAL_REL, buildtime=2006-01-14:15:02:09[UTC], changelist=378109, host=PWDFM101.wdf.sap.corp)
SapWebDynproGenerationCTemplates 7.0006.20060111154644.0000 (release=645_VAL_REL, buildtime=2006-01-14:15:18:53[UTC], changelist=384368, host=pwdfm101)
SapWebDynproGenerationCore 7.0006.20051128151834.0000 (release=645_VAL_REL, buildtime=2006-01-14:15:05:21[UTC], changelist=378108, host=PWDFM101.wdf.sap.corp)
SapWebDynproGenerationTemplates 7.0006.20060111154644.0000 (release=645_VAL_REL, buildtime=2006-01-14:15:18:53[UTC], changelist=384368, host=pwdfm101)
sap.com/tcwddispwda
No information available null
sap.com/tcwdcorecomp
No information available null
Detailed Error Information
Detailed Exception Chain
<b>com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Cannot find repository information for component usage ddic:com (Hint: Does a component usage of that name really exist?)</b>
at com.sap.tc.webdynpro.progmodel.controller.Component.createComponentUsage(Component.java:815)
at com.sap.tc.webdynpro.progmodel.controller.Component.getComponentUsageInternal(Component.java:467)
<b> at com.sap.tc.webdynpro.progmodel.controller.Component.getMappableContext(Component.java:414)</b>
My code in the init of view controller is as follows:-
<b>IWDAttributeInfo attInfo= wdContext.getNodeInfo().addMappedAttribute("dynamicAtt", "ddic:com.sap.dictionary.string");
wdContext.currentContextElement().setAttributeValue("dynamicAtt", "Hello narpal");
IWDNodeInfo localnodeInfo = wdContext.wdGetAPI().getRootNode().getChildNode("dynamicAtt",1).getNodeInfo();
IWDNodeInfo poNodeInfo = wdComponentAPI.getContext().getRootNode().getChildNode("DynamicNode",IWDNode.LEAD_SELECTION).getNodeInfo();
localnodeInfo.setMapping(localnodeInfo, true);</b>
Thanks in advance
Narpal
hi,
okay so you want to go for mapping the contexts, use this functions
setMapping(IWDNodeInfo mappedNode, boolean selectionMapped) Sets the mapping of a mapped node that has been declared before.
addMappedAttribute(java.lang.String name, java.lang.String mappedName) Adds a new mapped attribute to the structure.
addMappedChild(java.lang.String name, java.lang.Class elementClass, boolean singleton, boolean mandatorySelection, boolean multipleSelection, java.lang.String mappedPath, boolean selectionMapped, boolean initializeLeadSelection) Dynamically declares and adds a mapped child NodeInfo with the given properties.
pleae refer these links, it wil be of help
regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
why you want to go for addMappedAttribute(),
use addAttribute()
regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please read the Javadoc of IWDNodeInfo.addMappedAttribute(String, String).
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.