I added one attribute in AbstractOrderEntryModel,but I want to populate this attribute in OrderEntryData. I added just a new property in OrderEntryData but its not working. so to get this in OrderEnryData do we have to write separate populator for this ?
1 回答
0
在 extension-beans.xml 中添加新属性。下面的代码会将新属性添加到现有的 OrderEntryData bean。
<bean class="de.hybris.platform.commercefacades.order.data.OrderEntryData">
<property name="newAttribute" type="Integer"/>
</bean>
您还需要创建一个新的 Populator(请参阅de.hybris.platform.commercefacades.order.converters.populator.OrderEntryPopulator
参考资料),并通过 customextension-spring.xml 将 populator 添加到转换器。
<bean id="customOrderEntryPopulator" class="com.chang.populators.CustomOrderEntryPopulator" />
<bean parent="modifyPopulatorList">
<property name="list" ref="orderEntryConverter"/>
<property name="add" ref="customOrderEntryPopulator"/>
</bean>
其他参考:
于 2020-04-05T06:53:20.840 回答