cancel
Showing results for 
Search instead for 
Did you mean: 

Explorer tree for each perspective

Former Member
0 Kudos

Hi ,

I want to configure explorer tree specific to perspective.Each perspective can have different explorer tree.

Consider one perspective is having 2 nodes in explorer tree and another perspective is having 3 nodes,when user changes perspective it should display corresponding explorer tree.

Thanks, Ashwini

Accepted Solutions (1)

Accepted Solutions (1)

former_member632755
Active Contributor
0 Kudos

Hi, you have two possibilities:

  • as described here you can use the explorerTreeConfigCtx to define another component to look up

  • you can declare additional context attribute called module which should be aqual to the id of the perspective (the root widget's id of the perpective); in this case you may use the same component

Cheers, Wojtek

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello,

I had a similar problem and fixed that using backoffice roles and principals.

I create two backoffice roles for backoffice (check the impex below, you can run it um hac -> console -> impex import):

 INSERT_UPDATE backofficerole;    uid[unique=true];    name;    
 ;                                vendor_role;        Vendor Role;
 ;                                marketing_role;        Marketing Role;
 

After that a customized two explorer trees based one for each role in my *-backoffice-config.xml

// This one is relative to my first perspective. I removed some stuff that shouldn't be display for this role and add some new stuff

     <context principal="vendor_role" component="explorer-tree" merge-by="module">
         <n:explorer-tree >
             <n:navigation-node id="backoffice_dashboard" merge-mode="replace"/>
             <n:navigation-node id="Vendor Portal" expanded-by-default="true">
                 <n:type-node id="Products" code="Product" merge-mode="append"/>
                 <!--<n:type-node id="Deliveries" code="MarketplaceDeliveryOrder" merge-mode="append"/>-->
             </n:navigation-node>
             <n:navigation-node id="hmc.cockpit" merge-mode="remove"/>
             <n:navigation-node id="hmc.cms2" merge-mode="remove"/>
             <n:navigation-node id="hmc_backoffice-workflow-inbox" merge-mode="remove"/>
             <n:navigation-node id="hmc_treenode_system" merge-mode="remove"/>
             <n:navigation-node id="hmc_treenode_catalog" merge-mode="remove"/>
             <n:navigation-node id="hmc_treenode_medias" merge-mode="remove"/>
             <n:navigation-node id="hmc_treenode_user" merge-mode="remove"/>
             <n:navigation-node id="hmc_treenode_order" merge-mode="remove"/>
             <n:navigation-node id="hmc_treenode_pricesettings" merge-mode="remove"/>
             <n:navigation-node id="hmc_treenode_c2l" merge-mode="remove"/>
             <n:navigation-node id="hmc_treenode_marketing" merge-mode="remove"/>
         </n:explorer-tree>
     </context>


//This one is relative to second perspective

        <context principal="marketing_role" component="explorer-tree" merge-by="module">
         <n:explorer-tree >
             <n:navigation-node id="backoffice_dashboard" merge-mode="replace" position="0"/>
             <n:navigation-node id="hmc.cockpit" merge-mode="remove"/>
             <n:navigation-node id="hmc.cms2" merge-mode="remove"/>
             <n:navigation-node id="hmc_backoffice-workflow-inbox" merge-mode="remove"/>
             <n:navigation-node id="hmc_treenode_system" merge-mode="remove"/>
             <n:navigation-node id="hmc_treenode_catalog" merge-mode="remove"/>
             <n:navigation-node id="hmc_treenode_medias" merge-mode="remove"/>
             <n:navigation-node id="hmc_treenode_user" merge-mode="remove"/>
             <n:navigation-node id="hmc_treenode_order" merge-mode="remove"/>
             <n:navigation-node id="hmc_treenode_pricesettings" merge-mode="remove"/>
             <n:navigation-node id="hmc_treenode_c2l" merge-mode="remove"/>
             <n:navigation-node id="hmc_treenode_marketing" merge-mode="append" position="1"/>
         </n:explorer-tree>
     </context>



I hope this will help you.

Former Member
0 Kudos

Hi Wojtek,

Thank you for your help.

I have tried with first approach and it is working fine. But using second approach it is not working.When i tried to debug it, i found that value of module attribute is getting overridden by myextension name.Although my problem is solved, but i want to know why it is not working with second approach.

I also have tried with setting value of config.context.perspective property to widget id of the perspective and it is working. Could you please confirm that this approach is correct?If yes, when should i use explorerTreeConfigCtx and config.context.perspective?