cancel
Showing results for 
Search instead for 
Did you mean: 

Why custom label provider is not working in NG cockpit hybris 5.4

Former Member
0 Kudos
696

Hi ,

We have tried to implement custom label provider but it is not picked by ng cockpit.

e.g.

 <y:base xmlns:y="http://www.hybris.com/cockpit/config/hybris">
     <y:labels beanId="myRegionProvider">
     </y:labels>
 </y:base>

bean id="myRegionProvider" class="xyz.widgets.labels.MyRegionProvider" Spring bean in -backoffice-spring.xml

Please let us know what I'm missing here.

Thanks, Trilok

Accepted Solutions (1)

Accepted Solutions (1)

pascu
Explorer
0 Kudos

Solved it by creating an ApplicationListener bean which listens on ContextRefreshedEvent.

Added the logic of moving the label provider beans in the parent context.

Answers (3)

Answers (3)

Former Member
0 Kudos

Thank you for your quick reply.

former_member632755
Active Contributor
0 Kudos

Hi,

this is a known issue. For the time being you would have to register a bean factory post processor to register the bean in the parent context.

This should be fixed in the 5.6.0 (chances are that we'll make it for 5.5.1 but I can't promise it).

For now the bean will only be visible in the context of your custom backoffice module.

Cheers, Wojtek

pascu
Explorer
0 Kudos

Can you please provide an example?

Former Member
0 Kudos

Hi Trilok

Do you have this configuration in context element?

I mean sth like this:

  <context type="com.hybris.cockpitng.util.Range" component="base">
         <y:base xmlns:y="http://www.hybris.com/cockpit/config/hybris">
             <y:labels beanId="rangeLabelProvider"/>
         </y:base>
     </context>

This configuration will enable your provider on specific part of cockpit ng application.

Best

Wojtek

Former Member
0 Kudos

Hi , Yes we have like this, context type="MyRegion" component="base"> http://www.hybris.com/cockpit/config/hybris"> context>

Thank, Trilok