Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

cq-msm-lockable is not working for page peroperties

Avatar

Level 1

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.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

 Hi @Afrin_shaik1 ,

 

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

 

View solution in original post

4 Replies

Avatar

Community Advisor

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

Avatar

Level 1

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

Avatar

Correct answer by
Community Advisor

 Hi @Afrin_shaik1 ,

 

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