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

To set Default value in dilaog property

Avatar

Level 3

how to set default value in aem6.4 dialog property . I have used "value" property but its not working .Is there anything else i need to add for default value .

1 Accepted Solution

Avatar

Correct answer by
Level 2

Verified this in 6.4 it works fine for me

<image

    jcr:primaryType="nt:unstructured"

    sling:resourceType="granite/ui/components/coral/foundation/form/pathbrowser"

    fieldDescription="Image"

    fieldLabel="Image Path [Desktop]"

    name="./image"

    rootPath="/content/dam"

    value="/content/dam/we-retail"/>

View solution in original post

9 Replies

Avatar

Community Advisor

Hi,

value should work, can you share your dialog xml? or try to add existing list component in we-retail site and check existing list core component's childDepth default value should appears

/apps/core/wcm/components/list/v1/list/cq:dialog/content/items/tabs/items/listSettings/items/column/items/setChildren/items/well/items/childDepth



Arun Patidar

Avatar

Level 3

Is it possible to set default value in pathbrowser ? i m trying to set in default value in pathbrowser  filed

Avatar

Level 2

Yes its possible to set a default value for the pathbrowser field. value property should work fine to set a default value.

Avatar

Correct answer by
Level 2

Verified this in 6.4 it works fine for me

<image

    jcr:primaryType="nt:unstructured"

    sling:resourceType="granite/ui/components/coral/foundation/form/pathbrowser"

    fieldDescription="Image"

    fieldLabel="Image Path [Desktop]"

    name="./image"

    rootPath="/content/dam"

    value="/content/dam/we-retail"/>

Avatar

Level 3

              Here is my dialog.xml         <path

                                        jcr:primaryType="nt:unstructured"

                                        sling:resourceType="granite/ui/components/foundation/form/pathbrowser"

                                        fieldLabel="Demo Path"

                                        name="./path"

                                        value="/content/default.jpg"/>

Avatar

Level 2

Checked with the dialog snippet you shared value property works fine for me.dialog.png

Avatar

Community Advisor

I've just checked, default value is working fine for pathbrowser for both Coral2 and Granite/Coral3 components.



Arun Patidar

Avatar

Level 3

I dont know whats happening with me still its not working for me

Avatar

Level 10

"Is it possible to set default value in pathbrowser:

You can set rootPath - that will act as the starting point when the user clicks the button in the component dialog. See the section titled ""Add the pathbrowser field to the dialog:

Building Experience Manager Components using Granite/Coral Resource Types