Bugfix
You can give attributes a dynamic label as an annotation. This can be done in-app, then you can calculate a label using TLScript. This leads to the following attribute definition:
<property name="Foo" type="tl.core:Double" > <annotations> <dynamic-label> <label> <expression>"Hello World"</expression> </label> </dynamic-label> </annotations> </property>
However, if you configure the calculation of the label as a Java implementation
<property name="Bar" type="tl.core:Double" > <annotations> <dynamic-label> <label config:interface="com.top_logic.layout.ScriptFunction3" class="com.top_logic.mercedes_benz.aema.LabelInCurrency" /> </dynamic-label> </annotations> </property>
An error occurs in the model editor if you click on such an attribute:
2025-05-06T10:15:11,763 ERROR [qtp71802912-34]: com.top_logic.mig.html.layout.ComponentContentHandler - Unable to render component with name 'com.top_logic.element/admin/model/modelEditor/typePartEditor.layout.xml#metaAttributeEdit' (Class: class com.top_logic.layout.form.component.EditComponent, Location: file:///WEB-INF/layouts/com.top_logic.element/admin/model/modelEditor/typePartEditor.layout.xml%20(D:/Development/Difa_AEMA_TL7/GIT/tl-engine-7/com.top_logic.element/src/main/webapp/WEB-INF/layouts/com.top_logic.element/admin/model/modelEditor/typePartEditor.layout.xml)(/WEB-INF/layouts/com.top_logic.element/admin/model/modelEditor/typePartEditor.layout.xml) line 905 column 6). (java.lang.ClassCastException: class jdk.proxy3.$Proxy460 cannot be cast to class com.top_logic.model.search.form.WithExpression (jdk.proxy3.$Proxy460 is in module jdk.proxy3 of loader org.eclipse.jetty.ee10.webapp.WebAppClassLoader @5241cf67; com.top_logic.model.search.form.WithExpression is in unnamed module of loader 'app')) (java.lang.ClassCastException: class jdk.proxy3.$Proxy460 cannot be cast to class com.top_logic.model.search.form.WithExpression (jdk.proxy3.$Proxy460 is in module jdk.proxy3 of loader org.eclipse.jetty.ee10.webapp.WebAppClassLoader @5241cf67; com.top_logic.model.search.form.WithExpression is in unnamed module of loader 'app')) S(3PIAdGoAYWVhoZz2SNOETa8tBOYl+j14x+9SRtHGYvk=) java.lang.ClassCastException: class jdk.proxy3.$Proxy460 cannot be cast to class com.top_logic.model.search.form.WithExpression (jdk.proxy3.$Proxy460 is in module jdk.proxy3 of loader org.eclipse.jetty.ee10.webapp.WebAppClassLoader @5241cf67; com.top_logic.model.search.form.WithExpression is in unnamed module of loader 'app') at com.top_logic.model.search.form.ScriptFunctionEditor$2.getSpecificationNonNull(ScriptFunctionEditor.java:67) at com.top_logic.basic.config.AbstractConfigurationValueProvider.getSpecification(AbstractConfigurationValueProvider.java:69) at com.top_logic.layout.form.values.edit.editor.ConfigurationFormatAdapter.format(ConfigurationFormatAdapter.java:54) at java.base/java.text.Format.format(Format.java:159) at com.top_logic.layout.form.model.ComplexField.checkFormat(ComplexField.java:391) at com.top_logic.layout.form.model.ComplexField.narrowValue(ComplexField.java:367) at com.top_logic.layout.form.model.AbstractFormField.setDefaultValue(AbstractFormField.java:587) at com.top_logic.layout.form.model.AbstractFormField.initializeField(AbstractFormField.java:1283) at com.top_logic.layout.form.values.Fields.bindValue(Fields.java:771) at com.top_logic.layout.form.values.edit.editor.AbstractEditor.init(AbstractEditor.java:121) at com.top_logic.model.search.form.ScriptFunctionEditor.init(ScriptFunctionEditor.java:47) at com.top_logic.layout.form.values.edit.editor.PlainEditor.addField(PlainEditor.java:92) at com.top_logic.layout.form.values.edit.editor.AbstractEditor.createUI(AbstractEditor.java:57) at com.top_logic.layout.form.values.edit.EditorFactory.createMember(EditorFactory.java:587) at com.top_logic.layout.form.values.edit.EditorFactory.createMember(EditorFactory.java:473) at com.top_logic.layout.form.values.edit.EditorFactory.initEditorGroup(EditorFactory.java:429) at com.top_logic.layout.form.values.edit.editor.ListEditor$ElementFactory.internalAddElement(ListEditor.java:621) at com.top_logic.layout.form.values.edit.editor.ListEditor$ElementFactory.initElements(ListEditor.java:552) at com.top_logic.layout.form.values.edit.editor.ListEditor.createUI(ListEditor.java:154) at com.top_logic.layout.form.values.edit.EditorFactory.createMember(EditorFactory.java:505) at com.top_logic.layout.form.values.edit.EditorFactory.initEditorGroup(EditorFactory.java:429) at com.top_logic.layout.form.values.edit.EditorFactory.initEditorGroup(EditorFactory.java:389) at com.top_logic.layout.form.values.edit.editor.ItemEditor$1.onChange(ItemEditor.java:141) at com.top_logic.layout.form.values.edit.editor.ItemEditor.initContainer(ItemEditor.java:160) at com.top_logic.layout.form.values.edit.editor.ItemEditor.createUI(ItemEditor.java:114) at com.top_logic.layout.form.values.edit.EditorFactory.createMember(EditorFactory.java:496) at com.top_logic.layout.form.values.edit.EditorFactory.initEditorGroup(EditorFactory.java:429) at com.top_logic.layout.form.values.edit.EditorFactory.initEditorGroup(EditorFactory.java:389) at com.top_logic.layout.form.declarative.DeclarativeFormBuilder.createForm(DeclarativeFormBuilder.java:248) at com.top_logic.layout.form.declarative.DeclarativeFormBuilder.getModel(DeclarativeFormBuilder.java:233) at com.top_logic.layout.form.component.FormComponent.createFormContext(FormComponent.java:697) at com.top_logic.layout.form.component.FormComponent.getFormContext(FormComponent.java:509) at com.top_logic.layout.form.declarative.DirectFormDisplay.getFormMemberToDisplay(DirectFormDisplay.java:456) at com.top_logic.layout.form.declarative.DirectFormDisplay.createContents(DirectFormDisplay.java:419) at com.top_logic.layout.form.declarative.DirectFormDisplay.createView(DirectFormDisplay.java:281) at com.top_logic.layout.form.declarative.FormDisplayContentView.renderComponent(FormDisplayContentView.java:47) at com.top_logic.layout.structure.InlineContentView.writeComponentContents(InlineContentView.java:155) at com.top_logic.layout.structure.InlineContentView.internalWrite(InlineContentView.java:125) at ...