Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

To set Default value in dilaog property

rajs73651622
Level 3
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
k_ra
Correct answer by
Level 2
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
Arun_Patidar
Community Advisor
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

rajs73651622
Level 3
Level 3

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

k_ra
Level 2
Level 2

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

k_ra
Correct answer by
Level 2
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"/>

rajs73651622
Level 3
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"/>

k_ra
Level 2
Level 2

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

Arun_Patidar
Community Advisor
Community Advisor

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

rajs73651622
Level 3
Level 3

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

smacdonald2008
Level 10
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