cancel
Showing results for 
Search instead for 
Did you mean: 

How to override the "ExplorerTreeController"?

andrebarbosa1
Advisor
Advisor
0 Kudos

Dear colleagues,

How can I override the "ExplorerTreeController" file?

Path: /hybris/bin/modules/backoffice-framework/backoffice/web/webroot/WEB-INF/lib/backoffice-widgets-20.11.8-RC1.jar!/com/hybris/cockpitng/widgets/common/explorertree/ExplorerTreeController.class

Best regards,

André

Accepted Solutions (0)

Answers (1)

Answers (1)

parasmpatel
Explorer

Hi Andre,
You can create a new widget definition which extends the OOTB "com.hybris.cockpitng.widgets.common.explorertree" definition and specify you custom controller within this definition.xml.
Below is a sample snippet,

<widget-definition extends="com.hybris.cockpitng.widgets.common.explorertree"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xsi:noNamespaceSchemaLocation="http://www.hybris.com/schema/cockpitng/widget-definition.xsd">
    
    <controller class="com.test.backoffice.widgets.controller.CustomExplorerTreeController" />
 
</widget-definition> 

Secondly, create CustomExplorerTreeController which will extend ExplorerTreeController.

Regards,
Paras.

pavan_joshi1
Participant
0 Kudos

Right.

Just 'id' is missing in widget-definition.