我知道如何在hmc的编辑区添加一个字段,但我对后台办公室感到失望。
现在,我正在尝试扩展OAuthClientDetailsModel
,并尝试在后台编辑它。为此,我将其扩展到core-items.xml
之上。
<typegroup name="OCC">
<itemtype code="OAuthClientDetails" autocreate="false" generate="false">
<attributes>
<attribute qualifier="brands" type="StringList" autocreate="false">
<modifiers read="true" write="true" search="true" optional="true"/>
<persistence type="property"/>
</attribute>
</attributes>
</itemtype>
</typegroup>
到现在为止一切都很好。
现在到后台。为此,我需要编辑backoffice-config.xml
。我的当前代码(它不能正常工作)如下所示:
<context merge-by="type" parent="Item" type="OAuthClientDetails" component="editor-area">
<editorArea:editorArea name="">
<editorArea:tab name="hmc.tab.category.common" merge-mode="append">
<editorArea:section name="section.oauthclient.scope" merge-mode="append">
<editorArea:attribute qualifier="brands"/>
</editorArea:section>
</editorArea:tab>
</editorArea:editorArea>
</context>
这创建了一个新的选项卡和具有相同名称的部分,但我没有。
我有以下问题:
的某个地方吗?
发布于 2020-08-11 08:12:58
在每一个编辑领域,都有两个主要的因素:基本和行政。重要的是:它总是显示出来,即使在你切换的时候也是如此。管理:是onglet,所有未分类的属性都在其中。
如果不想为属性创建新的onglet,只需使用现有的onglet/部分:
为您的类型:章节: hmc.essential,section.oauthclient.basics,section.oauthclient.scope,section.oauthclient.tokenvalidity,section.oauthclient.disabled。
因此,让我们将其添加到section.oauthclient.scope节中。您需要保留相同的选项卡"hmc.tab.common“。
<context merge-by="type" parent="GenericItem" type="OAuthClientDetails" component="editor-area">
<editorArea:editorArea xmlns:editorArea="http://www.hybris.com/cockpitng/component/editorArea">
<editorArea:tab name="hmc.tab.common">
<editorArea:section name="section.oauthclient.scope" merge-mode="append">
<editorArea:attribute qualifier="brands"/>
</editorArea:section>
</editorArea:tab>
</editorArea:editorArea>
</context>
https://stackoverflow.com/questions/63174653
复制相似问题