on 04-04-2007 9:16 AM
I have a dropdown by key that is filled in the controller using the following code:
for (int i=0; i < wdContext.nodeZ360_Business_Unit().size(); i++)
{ valueSet.put(wdContext.nodeZ360_Business_Unit().getZ360_Business_UnitElementAt(i).getZzcode(),
wdContext.nodeZ360_Business_Unit().getZ360_Business_UnitElementAt(i).getZzdescription());
}
when I select the DD I want to set a context element with the text attribute from the DD. In the view of my Application onActionSelectedBusinessUnit(...) I have the following code:
IWDAttributeInfo attinfoBusUnit = wdContext.getNodeInfo().getAttribute("addBusUnit");
ISimpleTypeModifiable modinfoBusUnit = attinfoBusUnit.getModifiableSimpleType();
IModifiableSimpleValueSet vsBusUnit = modinfoBusUnit.getSVServices().getModifiableSimpleValueSet();
wdContext.currentContextElement().setBusUnitDescription(vsBusUnit.getText(wdContext.currentContextElement().getAddBusUnit()));
I get the following error when I select the the BusUnit DD:
com.sap.tc.webdynpro.progmodel.context.ContextException: MappedAttributeInfo(ParticipantListView.addBusUnit): must not modify the datatype of a mapped attribute
Could anyone help me solve this error?
thanks in advance
Anton
Hello Anton
To avoid the current exception that you are getting, you can do one thing. Create a method in your component controller , say "populateBusUnit" and in this method, cut and copy the code that you have written for "onActionSelectedBusinessUnit(...) ". Next, in the action handler method of the view ie "onActionSelectedBusinessUnit(...) ", make a call to this method ie "populateBusUnit".
This should solve your problem.
Actually, the problem was that you were trying to add value service to a mapped attribute. It should be done to the origin attribute.
I hope this helps you.
Regards
Kapil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
check out the datatype of "addBusUnit" and "BusUnitDescription".
are you adding the enumeration to "addBusUnit" using "sBusUnit" ?
Also the method getText() accepts the integer as a parameter.
when it takes integer parameter the corresponding
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anton,
You are modifiying the type of a mapped attribute which is not allowed.
Regards
Sid
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
10 | |
9 | |
8 | |
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.