on ‎2021 Jun 30 5:17 PM
I see that there is an OOTB converter called defaultOrderEntryConverter from commercefacades-spring.xml.
<bean id="defaultOrderEntryConverter" parent="abstractPopulatingConverter">
<property name="targetClass" value="de.hybris.platform.commercefacades.order.data.OrderEntryData"/>
<property name="populators">
<list>
<ref bean="orderEntryPopulator"/>
</list>
</property>
</bean>
What if I have a custom Populator that I want to add on top of what is already provided in here? I cannot just add it to the <list> because this XML is read-only.
Is there a way to "extend" this converter, and then add my custom populator in that one?
Request clarification before answering.
You can use modifyPopulatorList bean for this.
The following is an example from OOTB (acceleratorfacades-spring.xml)
<bean parent="modifyPopulatorList">
<property name="list" ref="orderEntryConverter"/>
<property name="add" ref="cartEntryActionPopulator"/>
</bean>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
ccronquillo no, ModifyPopulatorList class expects single value for add property. But you can add more than one bean definition for modifyPopulatorList into your customextension-spring.xml
<bean id="myOrderEntryConverter" parent="defaultOrderEntryConverter">
<property name="populators">
<list merge="true">
<ref bean="myAddedOrderPopulator"/>
</list>
</property>
</bean>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.