请问为何在生成的编辑页面中加上groupBox后,textField原有的label都没有了?


#1

image
如图,产品编号这个textField如果放到groupBox之外就可以显示出label,放到groupBox里面就不显示label了


#2

能把界面定义的XML 发一下吗


#3
<?xml version="1.0" encoding="utf-8"?>

<window xmlns="http://schemas.haulmont.com/cuba/screen/window.xsd" caption="msg://editorCaption" focusComponent="form" messagesPack="com.hanhai.crm.web.product">  
  <data> 
    <instance id="productDc" class="com.hanhai.crm.entity.Product" view="product-view"> 
      <loader/> 
    </instance> 
  </data>  
  <dialogMode height="AUTO" width="800" modal="true" forceDialog="true"/>  
  <layout expand="editActions" spacing="true"> 
    <form id="form" dataContainer="productDc" width="603px"> 
      <textField id="codeField" property="code"/>  
      <groupBox caption="基本信息" spacing="true" width="375px"> 
        <textField id="nameField" property="name"/>  
        <lookupField id="proTypeField" property="proType"/>  
        <textField id="unitField" property="unit"/>  
        <textField id="specsField" property="specs"/>  
        <textField id="remarkField" property="remark"/> 
      </groupBox>  
      <groupBox caption="BOM设置" spacing="true" width="376px"> 
        <pickerField id="parentField" property="parent"> 
          <actions> 
            <action id="lookup" type="picker_lookup"/>  
            <action id="clear" type="picker_clear"/> 
          </actions> 
        </pickerField>  
        <textField id="refrenceNumberField" property="refrenceNumber"/> 
      </groupBox>  
      <groupBox caption="拆包/拆箱" spacing="true" width="AUTO"> 
        <textField id="auxiliaryUnitField" property="auxiliaryUnit"/>  
        <textField id="equivalentQuantityField" property="equivalentQuantity"/> 
      </groupBox> 
    </form>  
    <hbox id="editActions" spacing="true"> 
      <button action="windowCommitAndClose"/>  
      <button action="windowClose"/> 
    </hbox> 
  </layout> 
</window>

#4

给字段指定 caption 属性


#5

好使了 ,感谢大神指点