cancel
Showing results for 
Search instead for 
Did you mean: 

How to exclude OOB attributes in Back Office Editor Area component

Former Member
0 Kudos

I am migrating hmc to back office and I am using hybris 5.7.

While doing this , i couldn't find the equivalent for hmc's exclude tag and exclusion attribute. Please find the below code.

           <organizer>
                  <search mode="append">
                        <condition attribute="name" />
                  </search>
                  <result defaultview="list" mode="append">
                        <listview scrollbar="true">
                               <itemlayout>
                                      <attribute name="name" />
                                      <attribute name="uid" />

                               </itemlayout>
                        </listview>
                  </result>
                  <editor>
                  <exclude>
                               <exclusion attribute="permissionGroups" />
                               <exclusion attribute="permissions" />
                               <exclusion attribute="approvergroups" />
                               <exclusion attribute="approvers" />
                               <exclusion attribute="phoneNumbers" />
                               <exclusion attribute="cn" />
                               <exclusion attribute="dn" />
                               <exclusion attribute="ldaplogin" />
                               <exclusion attribute="ldapaccount" />
                               <exclusion attribute="domain" />
                        </exclude>
                        <tab name="tab.common" position="0" mode="append">
                        <section name="properties">



These values domain,ldaplogin etc .. are OOB and there is provision to exclude them in HMC. How to achieve the same implementation in BackOffice.

Please help me on this by sharing your inputs.

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi,

You can do this by changes custom property(hiddenForUI) value using impex as below.

INSERT_UPDATE AttributeDescriptor;attributeHandler[unique=true];enclosingType(code)[unique=true];hiddenForUI[default=true] ;Product_europe1DiscountsAttributeHandler;Product;TRUE

Former Member
0 Kudos

Hi, You can try solution provided in https://answers.sap.com/questions/12771391/view.html

I hope this is helpful, Luke

former_member625836
Active Contributor
0 Kudos

Hi,

is definitively right. Backoffice provides some ootb configuration of editor area. If anybody needs to remove, reorganize, add, change any of it, it is required to use merging mechanism by specifying them in any of extensions with backoffice nature. In this particular situation, you should use merge-mode of type remove. Please bear in mind that a specific attribute may be display in many places and you need to precisely point which one is to be removed (correct tab and section names).

Cheers, Jacek

former_member384558
Participant
0 Kudos

Hi ,

I have tried something like that earlier in my case:

 <editorArea:section name="hmc.unbound">
       <editorArea:attribute merge-mode="remove" qualifier="europe1Taxes"/>
 </editorArea:section>

and it does not help. It only applies when I use something like this (removing the Unbound section):

 <editorArea:section merge-mode="remove" name="hmc.unbound"/>

or (removing the administration tab):

 <editorArea:tab merge-mode="remove" name="hmc.administration"/>

It does not work because it is in the Administration tab? Actually I have tried on other tabs too but no chance (see image: ). Anything, that I have missed. BTW the namespace is empty since I use this setting:

 <context merge-by="type" type="Product" component="editor-area" module="marketplacecore">
     <editorArea:editorArea xmlns:editorArea="http://www.hybris.com/cockpitng/component/editorArea" xmlns="http://www.hybris.com/cockpitng/component/editorArea">
 
 ...

former_member625836
Active Contributor
0 Kudos

europe1Taxes is displayed in Administration tab in Unbound section. So this is a little bit different. An Unbound section is a custom section handled by a dedicated spring bean. So you have following possibilities:

  1. you may remove whole Administration tab

  2. you may remove whole Unbound section

  3. you may extend com.hybris.cockpitng.widgets.editorarea.sections.UnboundSectionRenderer with your own implementation of prepareUnboundConfiguration method

  4. you may set Hidden for UI parameter for europe1Taxes attribute, but it will affect every aspect of UI

Cheers, Jacek

former_member384558
Participant
0 Kudos

It seems like this approach above from does not work. In particular why do one need to add the remove tag within the tab / section? Since in hMC you don't need to specify that. I have a similar use-case reported like above. I tried the provided solution from , adjusted to my use-case, but nothing helps. What exactly is the counterpart of hMC-tag in the Backoffice-extension? I could not find any documentation regarding the Backoffice xml references. Or did I miss something, can anyone support here please? Thanks!

cieslo
Active Participant
0 Kudos

Hi,

Please have a look at these 2 paragraphs from Wiki page:

Your code should be similar to this (use merge-mode="remove"):

<context merge-by="module" type="Product" component="editor-area">
<editorArea:editorArea xmlns:editorArea="http://www.hybris.com/cockpitng/component/editorArea">
<editorArea:tab name="hmc.tab.community" position="30">
<editorArea:section name="hmc.product.sections.customerreviews">
<editorArea:attribute qualifier="productReviews" merge-mode="remove"/>
</editorArea:section>
</editorArea:tab>
</editorArea:editorArea>
</context>