在子类中引用基类中的模板时,在子类编辑界面每保存一次,对应的引用的基类模板就增加一次。

基类模板083347de1fb8b99408aac126f8c979e
64e2ba67e74ecea4593f9bf7ef16178
子类中引用该模板7c7c3e4a42c9d7515a344f2756faba0
a3670d2d30a4b0d1d1e16bffba7a79c
出现的问题是,子类模版编辑页面每刷新一次,就会多出三个Colum标签(基类中有三个column标签)。多刷几次就出现好多的column标签。

看起来像是 studio 的 bug, 多出来这些 columns 是在子类模板中出现的?还有,你提到的“编辑界面每刷新一次”这个是在哪里做的操作?

是的,就是在这个界面,每次按CTRL+s 都会多出三个columncc61e9bd86853790ac6ae44edde2ae7

我试了一下,没有重现你这个问题,用的 studio 的哪个版本?

2018.3的版本。

更新到最新的试试,Studio 11.1
image

更新版本仍然出现同样问题

我这边确实没有重现,这个改动其实不按 ctrl+s,IDEA 也能自动保存。
是否方便提供一下基类 xml 和子类 xml,我们看看能否重现这个问题?

基类xml

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<window xmlns="http://schemas.haulmont.com/cuba/screen/window.xsd"
        caption="msg://editorCaption"
        focusComponent="form"
        messagesPack="com.company.uimodel.web.screens.baseclass">
    <data>
        <instance id="baseclassDc"
                  class="com.company.uimodel.entity.Baseclass"
                  view="_local">
            <loader/>
        </instance>
    </data>
    <dialogMode height="600"
                width="800"/>
    <layout expand="" spacing="true">
        <tabSheet id="tabSheet">
            <tab caption="Tab" margin="true,false,false,false" spacing="true">
                <form id="form" dataContainer="baseclassDc">
                    <column width="30%">
                        <textField id="nameField" property="name"/>
                        <textField id="nameField1" property="name"/>
                    </column>
                    <column width="30%">
                        <textField id="ageField" property="age"/>
                        <textField id="ageField1" property="age"/>
                    </column>
                    <column width="40%">
                        <dateField id="birthdayField" property="birthday"/>
                        <dateField id="birthdayField1" property="birthday"/>
                    </column>
                </form>
                <hbox id="editActions" spacing="true">
                    <button action="windowCommitAndClose"/>
                    <button action="windowClose"/>
                </hbox>
            </tab>
        </tabSheet>
    </layout>
</window>

用 1 左边那个键可以发代码:
image

我试试这个基类能否重现。

重现了。。应该是 studio 的 bug,我反馈一下

如果要使用界面扩展并且想避免 xml 自动 copy,需要给每一个能使用 id 属性的xml 元素指定 id。界面扩展机制是基于元素的 ID 进行扩展的。你贴的基类 xml 中下面这些元素缺少 id:

  • tabsheet’s tab
  • columns
  • buttons in an hbox

问题解决了,十分感谢:love_letter::heavy_heart_exclamation::heart::smiling_face_with_three_hearts: