如何在运行时更改窗口小部件配置以用于自定义后台扩展?

时间:2020-01-27 22:39:04

标签: hybris backoffice

我试图在运行时根据用户更改窗口小部件配置。我想用不同的促销子类型填充集合浏览器(这是我的要求的自定义类型)。对于某些用户,他们应该只看到某些促销类型,并且能够添加/删除这些类型。

<widget id="custombackoffice-search-init"
        widgetDefinitionId="com.hybris.cockpitng.widgets.common.propextractor"
        template="false" slotId="cockpitWidgetChildrenInvisible">
    <setting key="expression">'Promotion'</setting>
    <setting key="socketDataType_$T" type="String">java.lang.String</setting>
</widget>

<widget-connection sourceWidgetId="custombackoffice-search-init" outputId="genericOutput"
                   targetWidgetId="custombackoffice-collectionBrowser-fulltextsearch" inputId="type"/>
<widget-connection sourceWidgetId="custombackoffice-collectionBrowser-fulltextsearch" outputId="searchData"
                   targetWidgetId="custombackoffice-collectionBrowser-advancedsearchengine" inputId="searchData"/>
<widget-connection sourceWidgetId="custombackoffice-collectionBrowser-fulltextsearch" outputId="searchContextChanged"
                   targetWidgetId="custombackoffice-collectionBrowser-advancedsearchengine" inputId="changeSearchContext"/>
<widget-connection sourceWidgetId="custombackoffice-collectionBrowser-advancedsearchengine" outputId="pageable"
                   targetWidgetId="custombackoffice-collectionBrowser-browser" inputId="pageable"/>

是否可以将类型'Promotion'配置为在运行时具有不同的子类型,或者为每个用户预先配置不同的配置。我知道我可以使用searchRestrictions限制数据,但是仅使用搜索限制会影响* backoffice-listviewactions。仅当用户对配置的类型(例如, “促销”。

1 个答案:

答案 0 :(得分:0)

我认为您想实现this。如果您需要有关后台窗口小部件的更多答案,here是一个很好的文档,其中包含很多问题,而SAP提供了答案。

相关问题