To set Default value in dilaog property | Community
Skip to main content
Level 3
Aug 20, 2018 10:22 AM UTC
Solved

To set Default value in dilaog property

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 .

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
k_raAccepted solution
Level 2
Aug 20, 2018 1:45 PM UTC

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"/>

9 replies

smacdonald2008
Level 10
Aug 20, 2018 2:13 PM UTC

"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

Translate
Level 3
Aug 20, 2018 2:09 PM UTC

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

Translate
arunpatidar
New Participant
Aug 20, 2018 2:03 PM UTC

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

Translate
Arun Patidar
Level 2
Aug 20, 2018 2:03 PM UTC

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

Translate
Level 3
Aug 20, 2018 1:46 PM UTC

              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"/>

Translate
k_raAccepted solution
Level 2
Aug 20, 2018 1:45 PM UTC

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"/>

Translate
Level 2
Aug 20, 2018 1:36 PM UTC

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

Translate
Level 3
Aug 20, 2018 1:12 PM UTC

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

Translate
arunpatidar
New Participant
Aug 20, 2018 11:46 AM UTC

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

Translate
Arun Patidar