cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Customizing backoffice widget behaviour with js?

oscarsan
Explorer
0 Kudos
176

In backoffice, for the Customer item type, the widget for user groups is a list of groups. I would like to add some js events to this list.

I tried to add in my custombackoffice/resources/custombackoffice-backoffice-config.xml something like this:

<context type="Customer" merge-by="type" parent="Principal">
    <ea:attribute qualifier="groups">
       <ea:editor property="groups" widget="myCustomGroupEditor" />
    </ea:attribute>
</context>

Inside custombackoffice/resources/custombackoffice-backoffice-widgets.xml I added this:

<widgets xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="http://www.hybris.com/schema/cockpitng/widgets.xsd">
    <resources>
       <script src="custombackoffice/resources/backoffice/widgets/customListEditor.js"/>
    </resources>
    <widget-definition id="myCustomGroupEditor" class="my.namespace.MyCustomGroupEditor"/>
</widgets>

Inside custombackoffice/resources/backoffice/widgets/customListEditor.js I just added a console.log to test if the js is executed with no success (and no errors) after compiling and resetting backoffice.

How should I configure my xml's in order to add custom js events to an OOTB widget?

Thanks

 

Accepted Solutions (0)

Answers (0)