在 hmc 管理选项卡中限制或删除 attributechip 中的结果数量

Limit number of results in, or remove, attributechip from hmc admin tab

我在 Hybris 中的一个项目中有一个列表关系。此列表不需要显示在 HMC 管理选项卡中,并且在查看项目时会导致加载时间过长。

我在尝试使用 hmc.xml.

限制显示的结果数量或从 HMC 中删除特定属性芯片时遇到困难

如有任何建议,我们将不胜感激。

谢谢

<relation code="Favorite2ProductRelation" localized="false"
      generate="true" autocreate="true">
<sourceElement type="Favorite" qualifier="favorite"
               cardinality="many">
    <modifiers read="true" write="true" search="true" />
    <custom-properties>
        <property name="hiddenForUI">
            <value>Boolean.TRUE</value>
        </property>
    </custom-properties>
</sourceElement>
<targetElement type="Product" qualifier="product"
               cardinality="one">
    <modifiers read="true" write="true" search="true" initial="true"
               optional="false" />
</targetElement>

在属性定义中你可以设置属性 hiddenForUI,它会隐藏来自bo的字段:

<attribute ...>
    <custom-properties>
        <property name="hiddenForUI">
            <value>Boolean.TRUE</value>
        </property>
    </custom-properties>
</attribute>

不过好像不能用在关系...

您可以使用 impex 切换属性值:

INSERT_UPDATE RelationDescriptor;qualifier[unique=true];hiddenForUI[default=true]
;<attributeOfYourRelationToHide>;

如果您有一个属性名称出现在不同的对象中,您可以指定您使用哪个对象enclosingType(感谢 Mouad El Fakir 的召回)

INSERT_UPDATE RelationDescriptor;enclosingType(code)[unique=true];qualifier[unique=true];hiddenForUI[default=true]
;<objectHoldingTheAttributeToHide>;<attributeOfYourRelationToHide>;