0
votes

I have two types like AbstractOrder and OrderEntryDetails. They are related one to many. In backoffice I want to display 4 fields from AbstractOrder(code,date,totalPrice,user) table and 1 field(productcode) from OrderEntryDetails table. In my cus_ext-backoffice-config file I am calling it like below

<context merge-by="type" parent="GenericItem" type="AbstractOrder" component="listview">
    <lv:list-view xmlns:lv="http://www.hybris.com/cockpitng/component/listView">

        <lv:column qualifier="code"/>
        <lv:column qualifier="date" spring-bean="dateTimeListCellRenderer"/>
        <lv:column qualifier="totalPrice" spring-bean="numberDigitZeroListCellRenderer"/>
        <lv:column qualifier="user"/>       
        <lv:column qualifier="productCode"/>        

    </lv:list-view>
</context>

Hybris generated orderEntryDetails field in AbstactOrderModel.java file and it is collection.

Edit

My question is how to display productCode form orderEntryDetails collection which is inside AbstactOrder?

If my approach is not right, can someone please tell me some easier way to display some data from related(relation between two tables) tables.

1
The relation is already well defined AbstractOrder and AbstractOrderEntries (AbstractOrderEntry--->Product-->Productcode), what concrete challenge are you facing or what's not working?static void main
I have edited my question. I think it is more clear now.mamur

1 Answers

1
votes

You can use Dynamic Attribute for productCode: https://help.hybris.com/6.3.0/hcd/8bb46096866910149208fae7c4ec7596.html

Same way used for QuantityDeclined on ConsignmentEntry. May be my opinion is not best solution.