Hi!
I have an inputfield in my WD with extended value help (countryKey and CountryName, coming from R/3). The selected country should be passed to a bapi import parameter mapped in a model, but the problem is that an exception occurs stating that I cannot change the data type of the context attribute because it is mapped to a model.
How is this usually done?
Thanks,
faB
-
ContextException: AttributeInfo(SearchView.Iv_Land1): must not modify the datatype of a mapped attribute
Hi,
1. Create sub-node under your model node with cardinality 1..1 (non-singleton used in sample below)
2. In this sub-node create calculated attribute with the same primitive type as desired attribute has (say, string).
3. In setter / getter write code that will modify original attribute:
/* getter */ return element.node().parentElement().getAttributeValue("OriginalModelAttr"); /* setter */ element.node().parentElement().setAttributeValue("OriginalModelAttr", value);
4. Rebind your input field to newly created attribute, and apply any value set modifications to it.
VS
Add a comment