1
votes

I am trying to change widget configuration at runtime based on the user. I would like to populate the collection-browser with different sub types of promotions (this is a custom type for my requirement). For certain users they should only see certain promotion types and be able to add/delete these types.

<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"/>

Is there a way to configure the type 'Promotion' to have a different subtype at runtime or have different configurations configured beforehand for each user. I know I can restrict the data with searchRestrictions but using only search restrictions impacts the *backoffice-listviewactions. These actions are only visible if a user has read/write access on the configured type e.g. 'Promotion'.

1

1 Answers

0
votes

I think you want to achieve this . In case you need any more answers about backoffice widgets, here is a good documentation with a lot of questions with answers provided by SAP.