Hello All,
Can someone please help me with this exception:
com.sap.tc.webdynpro.progmodel.context.ContextException: NodeInfo(path=CalculatorComp/CalculatorCompView, class=com.sap.tc.webdynpro.progmodel.context.DataNodeInfo): cannot modify Number1 because it is mapped and there is no active NodeElement to take the value.
I created a WebService based on Session Bean that exposes few functions.
One of them receives two int numbers and returns a sum them.
I've created A WebDynPro project with this structure:
In order to do that I've created a model based on this WebService and made the following mapping:
1. I've mapped the model context into the component global context - this mapping contains both the two numbers and the result.
My context in my Controller was like this:
Request_node * (Father Node)
Add * (Children Node)
Number1 -
Number2 -
Response* (Children Node)
AddResponse* (Children Node)
Return -
PS: "*" is Node and "-" is Attribute
2. I've mapped the context values the global context into the context of the view, like this.
Number1 -
Number2 -
Response*
AddResponse*
Return -
3. I add the following code in init() method:
Calculator model = new Calculator(); wdContext.nodeRequest_Add().bind(new Request_Add(model));
4. I also add the following code in method to execute the WS.
public void executeAdd( ) {
//@@begin executeAdd()
//$$begin Service Controller(-1063927033)
IWDMessageManager manager = wdComponentAPI.getMessageManager();
try
{
wdContext.currentRequest_AddElement().modelObject().execute();
wdContext.nodeResponse().invalidate();
}
catch(Exception e)
{
manager.reportException(e.getMessage());
}
//$$end
//@@end
}
When I add values in fields and execute the method to call WS to happen the exception.
com.sap.tc.webdynpro.progmodel.context.ContextException: NodeInfo(path=CalculatorComp/CalculatorCompView, class=com.sap.tc.webdynpro.progmodel.context.DataNodeInfo): cannot modify Number1 because it is mapped and there is no active NodeElement to take the value.
Do Anyone has any idea?
Thanks regards
Eduardo
Edited by: Eduardo Luiz De Angeli on Mar 3, 2009 6:16 AM