首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >扩展Backoffice编辑区域

扩展Backoffice编辑区域
EN

Stack Overflow用户
提问于 2020-07-30 13:50:40
回答 1查看 1.8K关注 0票数 0

我知道如何在hmc的编辑区添加一个字段,但我对后台办公室感到失望。

现在,我正在尝试扩展OAuthClientDetailsModel,并尝试在后台编辑它。为此,我将其扩展到core-items.xml之上。

代码语言:javascript
运行
复制
<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。我的当前代码(它不能正常工作)如下所示:

代码语言:javascript
运行
复制
<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>

这创建了一个新的选项卡和具有相同名称的部分,但我没有。

我有以下问题:

  • 是否有一种简单的方法可以计算出可见的选项卡和节名?
  • 如何在第一个选项卡中添加到现有的性别--另一个字符串列表或其他字段?

的某个地方吗?

EN

回答 1

Stack Overflow用户

发布于 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“。

代码语言:javascript
运行
复制
    <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>
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/63174653

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档