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