Skip to Content
3
Feb 20, 2020 at 07:36 AM

backoffice different listviews for the same type

343 Views Last edit Mar 05, 2020 at 10:04 AM 2 rev

Hi

we would like to have 2 different navigation nodes in the explorer tree that would open 2 different listviews but for the same type.

Let's say Product has properties A, B, C, D. Then listview 1 should show properties A and B and listview 2 should show C and D.

There is the property colConfigCtxCode on com.hybris.cockpitng.collectionBrowser (hmc2list widget), which does exactly what we want, but we don’t know how to dynamically change that based on the selected navigation node.

<explorer-tree:navigation-node id="hmc_treenode_catalog">
            <explorer-tree:type-node code="Product" id="listview1"/>
            <explorer-tree:type-node code="Product" id="listview2"/>
        </explorer-tree:navigation-node>
 
        <context type="Product">
            <context component="listview1">
                <list-view:list-view>
                    <list-view:column qualifier="foo"/>
                    <list-view:column qualifier="bar" />
                </list-view:list-view>
            </context>
 
            <context component="listview2">
                <list-view:list-view>
                    <list-view:column qualifier="abc"/>
                    <list-view:column qualifier="xyz" />
                </list-view:list-view>
            </context>
        </context>