Skip to Content
5
Former Member
May 03, 2018 at 04:19 PM

Custom addon controller ignored

1269 Views

In order to modify a jsp from the commerceorgaddon I had to modify the UserManagementPageController defined in the same hybris addon.

To resolve this problem, I created a new addon wich depends on commerceorgaddon. In my newaddon I copied the UserManagementPageController and made my changes there (also I put there my new jsp). Finally I define in the web-spring.xml of my addon the following:

     <alias alias="userManagementPageController" name="customUserManagementPageController"/>
     <bean name="customUserManagementPageController" class="de.hybris.platform.commerceorgaddon.controllers.pages.UserManagementPageController"/>
 
 <!-- add the url to controller mapping to the existing SimpleUrlHandlerMapping bean -->
 <bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
     <property name="mappings">
         <props>
             <prop key="/my-company/organization-management/manage-users/**">customUserManagementPageController</prop>
         </props>
     </property>
 </bean>

The problem is that when I go to my storefront the UserManagementPageController being used is the the one defined in the commerceorgaddon and not the one that I customized in my new addon.

Any idea how can I do to use my new controller?