sap-commerce-cloudbackoffice

How to hide an existing attribute in one tab and show it in the other tab


Hybris backoffice OOTB configuration comes with this attribute "last changes" shown in the administration tab as show below.

enter image description here

I have a requirement where I need to move the same attribute to the "history" tab as you can see above. I have made the following changes to bring that attribute based on the code below

<context merge-by="type" parent="GenericItem" type="Product" component="editor-area" module="pcmbackoffice"
             principal="backofficeadministratorrole,merchandisergroup,digitalmerchandisergroup,marketplacemanagergroup">
        <editorArea:editorArea xmlns:editorArea="http://www.hybris.com/cockpitng/component/editorArea">
            <editorArea:tab name="hmc.tab.product.change.logs" position="32" displayEssentialSectionIfPresent="false" merge-mode="merge">
                <editorArea:section name="hmc.tab.product.change.logs">
                    <editorArea:attribute qualifier="SavedValues"
                                          editor="com.hybris.cockpitng.editor.defaultmultireferenceeditor"  merge-mode="merge">
                        <editorArea:editor-parameter>
                            <editorArea:name>readOnly</editorArea:name>
                            <editorArea:value>true</editorArea:value>
                        </editorArea:editor-parameter>
                    </editorArea:attribute>
                </editorArea:section>
            </editorArea:tab>
    </editorArea:editorArea>
    </context>

An the atribute appears fine in the history tab as below

enter image description here

Question:

I want to hide / remove the attribute "last changes" from the administration tab.How can I do that ? Please advise.


Solution

  • You can use the following code:

    <context  parent="GenericItem" type="Product" component="editor-area">
        <editorArea:editorArea xmlns:editorArea="http://www.hybris.com/cockpitng/component/editorArea">
            <editorArea:tab name="hmc.administration">
                <editorArea:section name="hmc.section.saved.values" merge-mode="remove" >
                    <editorArea:attribute qualifier="SavedValues" merge-mode="remove"/>
                </editorArea:section>
            </editorArea:tab>
        </editorArea:editorArea>
    </context>