0

SAP コマース 1811

カスタム アイテム タイプの 1 つに対して 1 つのカスタム ラベル プロバイダーを作成し、それを component="base" に適用しましたが、Backoffice で機能しません。

CustomLabelProvider - backoffice/src フォルダー内に作成

public class CustomLabelProvider implements LabelProvider<CustomABCModel>
{  
    @Override
    public String getLabel(final CustomABCModel model)
    {
        // some custom logic
        return label;
    }

    @Override
    public String getDescription(final CustomABCModel model)
    {
       return getLabel(model);
    }

    @Override
    public String getIconPath(final CustomABCModel model)
    {
       return null;
    }
}

mybackoffice-backoffice-spring.xml

<bean id="customLabelProvider" class="com.hybris.backoffice.labels.impl.CustomLabelProvider"/>

mybackoffice-backoffice-config.xml

<context type="CustomABC" component="base" merge-by="type">
    <y:base>
        <y:labels>
            <y:labels beanId="customLabelProvider"/>
        </y:labels>
    </y:base>
</context>

すべての手順を実行しましたが、どういうわけか機能しません。Backoffice にラベルが表示されません。

ここで何がうまくいかないのですか?

4

2 に答える 2

0

ラベルのグループ化は XSD に関して正しくありません。

<context type="CustomABC" component="base" merge-by="type" parent="GenericItem">
        <y:base>
            <y:labels beanId="customLabelProvider"/>
        </y:base>
</context>
于 2021-05-24T04:41:06.677 に答える