cq-msm-lockable is not working for page peroperties | Community
Skip to main content
April 25, 2022
Solved

cq-msm-lockable is not working for page peroperties

  • April 25, 2022
  • 2 replies
  • 1158 views

Hi Team,

  I tried to add cq-msm-locable to my custom page properties in all possible ways but unable to see the changes. The properties are still editable and no lock/inherit icon is showing beside the properties. Any solution for this?

version : AEM cloud SDK

Thanks.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by MayurSatav

 Hi @afrinsh1 ,

 

I had a similar requirement but the thing is when I tried to replicate the issue on AEM on-premise version it is not working. But working fine on AEMaaCS. I am sharing my page property's complete node structure for your reference. Could you please try to implement a similar way to the way I did? 

 

<?xml version="1.0" encoding="UTF-8"?>
<jcr:root 
    jcr:primaryType="nt:unstructured"
    jcr:title="Page"
    sling:resourceType="cq/gui/components/authoring/dialog"
    extraClientlibs="[cq.common.wcm,core.wcm.components.page.v2.editor,cq.wcm.msm.properties,granite.contexthub.configuration,cq.siteadmin.admin.properties]"
    helpPath="https://www.adobe.com/go/aem_cmp_page_v2"
    mode="edit"
    trackingFeature="core-components:page:v2">
    <content
        granite:class="cq-dialog-content-page"
        jcr:primaryType="nt:unstructured"
        sling:resourceType="granite/ui/components/coral/foundation/container">
        <items jcr:primaryType="nt:unstructured">
            <tabs
                granite:class="cq-siteadmin-admin-properties-tabs"
                jcr:primaryType="nt:unstructured"
                sling:resourceType="granite/ui/components/coral/foundation/tabs"
                size="L">
                <items jcr:primaryType="nt:unstructured">
                    <basic
                        jcr:primaryType="nt:unstructured"
                        jcr:title="Basic"
                        sling:resourceType="granite/ui/components/coral/foundation/fixedcolumns">
                        <items jcr:primaryType="nt:unstructured">
                            <column
                                jcr:primaryType="nt:unstructured"
                                sling:resourceType="granite/ui/components/coral/foundation/container">
                                <items jcr:primaryType="nt:unstructured">
                                    <title
                                        jcr:primaryType="nt:unstructured"
                                        jcr:title="Title and Tags"
                                        sling:resourceType="granite/ui/components/coral/foundation/form/fieldset">
                                        <items jcr:primaryType="nt:unstructured">
                                            <title
                                                jcr:primaryType="nt:unstructured"
                                                sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
                                                fieldLabel="Title"
                                                name="./jcr:title"
                                                renderReadOnly="{Boolean}true"
                                                required="{Boolean}true">
                                                <granite:data
                                                    jcr:primaryType="nt:unstructured"
                                                    cq-msm-lockable="jcr:title"/>
                                            </title>
                                            <hideinnav
                                                jcr:primaryType="nt:unstructured"
                                                sling:resourceType="granite/ui/components/coral/foundation/form/checkbox"
                                                name="./hideInNav"
                                                renderReadOnly="{Boolean}true"
                                                text="Hide in Navigation"
                                                value="true">
                                                <granite:data
                                                    jcr:primaryType="nt:unstructured"
                                                    allowBulkEdit="{Boolean}true"
                                                    cq-msm-lockable="hideInNav"/>
                                            </hideinnav>
                                            <skipinsearch
                                                jcr:primaryType="nt:unstructured"
                                                sling:resourceType="granite/ui/components/coral/foundation/form/checkbox"
                                                name="./skipInSearch"
                                                renderReadOnly="{Boolean}true"
                                                text="Skip In Search"
                                                value="true">
                                                <granite:data
                                                    jcr:primaryType="nt:unstructured"
                                                    allowBulkEdit="{Boolean}true"
                                                    cq-msm-lockable="skipInSearch"/>
                                            </skipinsearch>
                                        </items>
                                    </title>
                                </items>
                            </column>
                        </items>
                    </basic>
                </items>
            </tabs>
        </items>
    </content>
</jcr:root>

Thanks

 

2 replies

arunpatidar
Community Advisor
Community Advisor
April 25, 2022

Hi,

Could you please share the sample dialog?

Below example works in standard AEM. I did not tried in AEMaaCS.

<ptype
jcr:primaryType="nt:unstructured"
cq:showOnCreate="{Boolean}true"
sling:resourceType="cq/gui/components/coral/common/form/tagfield"
allowBulkEdit="{Boolean}true"
fieldLabel="type "
multiple="{Boolean}false"
name="./ptype"
rootPath="/content/cq:tags">
<granite:data
    jcr:primaryType="nt:unstructured"
    cq-msm-lockable="ptype"/>
</ptype>
Arun Patidar
AfrinSh1Author
April 25, 2022

sample dialog 1 :

<propName
jcr:primaryType = "nt:unstructured"
sling:resourceType = "granite/ui/components/coral/foundation/form/checkbox"
text = "sampleCheckbox"
name = "./propName"
value = "{Boolean}true"
uncheckedValue="{Boolean}false" >
<granite:data
jcr:primaryType="nt:unstructured"
cq-msm-lockable="propName" />
</propName>

sample dialog 2 :

<propName
jcr:primaryType = "nt:unstructured"
sling:resourceType = "granite/ui/components/coral/foundation/form/checkbox"
text = "sampleCheckbox"
name = "./propName"
value = "{Boolean}true"
uncheckedValue="{Boolean}false"
cq-msm-lockable="propName" /> 

 

i tries in both ways...still changes are not reflecting

arunpatidar
Community Advisor
Community Advisor
April 25, 2022
MayurSatav
Community Advisor and Adobe Champion
MayurSatavCommunity Advisor and Adobe ChampionAccepted solution
Community Advisor and Adobe Champion
April 25, 2022

 Hi @afrinsh1 ,

 

I had a similar requirement but the thing is when I tried to replicate the issue on AEM on-premise version it is not working. But working fine on AEMaaCS. I am sharing my page property's complete node structure for your reference. Could you please try to implement a similar way to the way I did? 

 

<?xml version="1.0" encoding="UTF-8"?>
<jcr:root 
    jcr:primaryType="nt:unstructured"
    jcr:title="Page"
    sling:resourceType="cq/gui/components/authoring/dialog"
    extraClientlibs="[cq.common.wcm,core.wcm.components.page.v2.editor,cq.wcm.msm.properties,granite.contexthub.configuration,cq.siteadmin.admin.properties]"
    helpPath="https://www.adobe.com/go/aem_cmp_page_v2"
    mode="edit"
    trackingFeature="core-components:page:v2">
    <content
        granite:class="cq-dialog-content-page"
        jcr:primaryType="nt:unstructured"
        sling:resourceType="granite/ui/components/coral/foundation/container">
        <items jcr:primaryType="nt:unstructured">
            <tabs
                granite:class="cq-siteadmin-admin-properties-tabs"
                jcr:primaryType="nt:unstructured"
                sling:resourceType="granite/ui/components/coral/foundation/tabs"
                size="L">
                <items jcr:primaryType="nt:unstructured">
                    <basic
                        jcr:primaryType="nt:unstructured"
                        jcr:title="Basic"
                        sling:resourceType="granite/ui/components/coral/foundation/fixedcolumns">
                        <items jcr:primaryType="nt:unstructured">
                            <column
                                jcr:primaryType="nt:unstructured"
                                sling:resourceType="granite/ui/components/coral/foundation/container">
                                <items jcr:primaryType="nt:unstructured">
                                    <title
                                        jcr:primaryType="nt:unstructured"
                                        jcr:title="Title and Tags"
                                        sling:resourceType="granite/ui/components/coral/foundation/form/fieldset">
                                        <items jcr:primaryType="nt:unstructured">
                                            <title
                                                jcr:primaryType="nt:unstructured"
                                                sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
                                                fieldLabel="Title"
                                                name="./jcr:title"
                                                renderReadOnly="{Boolean}true"
                                                required="{Boolean}true">
                                                <granite:data
                                                    jcr:primaryType="nt:unstructured"
                                                    cq-msm-lockable="jcr:title"/>
                                            </title>
                                            <hideinnav
                                                jcr:primaryType="nt:unstructured"
                                                sling:resourceType="granite/ui/components/coral/foundation/form/checkbox"
                                                name="./hideInNav"
                                                renderReadOnly="{Boolean}true"
                                                text="Hide in Navigation"
                                                value="true">
                                                <granite:data
                                                    jcr:primaryType="nt:unstructured"
                                                    allowBulkEdit="{Boolean}true"
                                                    cq-msm-lockable="hideInNav"/>
                                            </hideinnav>
                                            <skipinsearch
                                                jcr:primaryType="nt:unstructured"
                                                sling:resourceType="granite/ui/components/coral/foundation/form/checkbox"
                                                name="./skipInSearch"
                                                renderReadOnly="{Boolean}true"
                                                text="Skip In Search"
                                                value="true">
                                                <granite:data
                                                    jcr:primaryType="nt:unstructured"
                                                    allowBulkEdit="{Boolean}true"
                                                    cq-msm-lockable="skipInSearch"/>
                                            </skipinsearch>
                                        </items>
                                    </title>
                                </items>
                            </column>
                        </items>
                    </basic>
                </items>
            </tabs>
        </items>
    </content>
</jcr:root>

Thanks