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

How to override an attributeHandler

former_member192125
Participant
0 Likes
525

Hello,

I need to override the handler contactEmailAttribute from contactEmail attribute defined in commerceservices:

 <attribute qualifier="contactEmail" type="java.lang.String">
                         <persistence type="dynamic" attributeHandler="contactEmailAttribute" />
                         <modifiers write="false" />
                         <description>Contact email is a dynamic attribute that is used to determine contact email
                             address.
                         </description>
                     </attribute>

but there is no alias defined for the handler:

 <bean id="contactEmailAttribute" class="de.hybris.platform.commerceservices.model.ContactEmailAttribute">
         <property name="customerEmailResolutionService" ref="customerEmailResolutionService"/>
     </bean>

What would you suggest to do?

Thanks! Riccardo

Accepted Solutions (1)

Accepted Solutions (1)

arvind-kumar_avinash
Active Contributor
0 Likes

Did you try something like:

 <bean id="yourNewId" class="yourpackage.YourClass">
     ...
     ...
     ...
 </bean>
  
 <alias name="yourNewId" alias="contactEmailAttribute"/>

I haven't tested it but I think it should work.

Answers (0)