enhancement
critical
major
minor
minor
Given two concrete types, A and B, both of which extend the interface V. V declares a reference-type attribute x without any further implementation.
x is overridden in both A and B, with different storage rules for calculating the values. For example,
- A.x always returns A (self-reference)
- B.x always returns ROOT (or another context element).
When querying values, the framework does not always correctly determine the proper configuration:
// $x.instanceOf(`A`) == true $x.get(`A.x`) returns A $x.get(`V.x`) returns null $x.get(`B.x`) returns null or an exception
// $x.instanceOf(`B`) == true $x.get(`A.x`) returns null or an exception $x.get(`V.x`) returns null $x.get(`B.x`) returns ROOT
A side effect of this is that if no form definition is specified for the type and the framework falls back to “additional attributes,” the form field for x always returns null. However, if a form definition is specified for the concrete type, the form field for x contains the expected value. This is likely because, behind the scenes, the framework queries the interface attribute if no form definition is provided, and the concrete attribute otherwise.
Test
- View in tl-demo: Technical Demo:Tests:Override
- /com.top_logic.demo/src/test/com/top_logic/demo/scripted/model/attribute/override/TestValuesOfOverriddenAttributesInForms.script.xml