To set Default value in dilaog property | Community
Skip to main content
New Participant
August 20, 2018
Solved

To set Default value in dilaog property

  • August 20, 2018
  • 9 replies
  • 8064 views

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.
Best answer by k_ra

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
New Participant
August 20, 2018

"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

New Participant
August 20, 2018

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

arunpatidar
New Participant
August 20, 2018

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

Arun Patidar
New Participant
August 20, 2018

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

New Participant
August 20, 2018

              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_raAccepted solution
New Participant
August 20, 2018

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

New Participant
August 20, 2018

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

New Participant
August 20, 2018

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

arunpatidar
New Participant
August 20, 2018

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