Skip to main content
Level 2
Jan 14, 2016 10:30 AM UTC
Solved

For Dialog Values Defaultily

Hello,

 

I was Developed a component on that component i am providing values through dialog like defaultValue property 

My problem is when i was drag and drop from sidekick to parsys, The default values are not apply by defaultly when component drag and drop, in edit bar of that component when click and without changing any values am clicking ok that time the design is working fine

Please tell me the solution............ 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Kunal_Gaba_
Kunal_Gaba_Accepted solution
New Member
Jan 14, 2016 7:14 PM UTC

For this use case you need to create a node cq:template of the type nt:unstructured under your component.  Please go through the following blog for more details - 

http://blogs.adobe.com/experiencedelivers/experience-management/defaults-in-your-component/

4 replies

edubey
Level 10
Jan 14, 2016 10:35 AM UTC

Can you share the dialog.xml for your component.

You are using sightly or jsp?

Translate
brahma_RAuthor
Level 2
Jan 14, 2016 10:57 AM UTC

am using sightly

 

<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
    jcr:primaryType="cq:Dialog"
    helpPath=""
    title="Search Footer"
    xtype="panel">
    <items jcr:primaryType="cq:WidgetCollection">
        <heading
            jcr:primaryType="cq:Widget"
            allowBlank="false"
            defaultValue="Can't find what you're looking for?"
            fieldDescription="Provide Headline for this Section."
            fieldLabel="Headline Title"
            maxLength="140"
            name="./jcr:headline"
            xtype="textfield"/>
        <searchfield
            jcr:primaryType="cq:Widget"
            allowBlank="false"
            defaultValue="Search by Keyword, Title/Author Item #, ISBN"
            fieldDescription="Provide Search Field for this Section."
            fieldLabel="Search Field"
            maxLength="140"
            name="./jcr:searchfield"
            xtype="textfield"/>
        <cliffimage
            jcr:primaryType="cq:Widget"
            allowBlank="false"
             defaultValue="/content/dam/scholastic/teachers-ecommerce/image/searchdog.png"
            fieldDescription="Please upload or select image from the DAM."
            fieldLabel="Clifford Image"
            name="./jcr:cliffimage"
            rootPath="/content/dam/scholastic/teachers-ecommerce/image"
            xtype="pathfield"/>       
        <selectList
            jcr:primaryType="cq:Widget"
            allowBlank="false"
            defaultValue="teachersLookingFor"
            fieldLabel="Style for Page ?"
            name="./styleOfPage"
            type="select"
            xtype="selection">
            <options jcr:primaryType="cq:WidgetCollection">
                <one
                    jcr:primaryType="nt:unstructured"
                    text="Teachers"
                    value="teachersLookingFor"/>
                <two
                    jcr:primaryType="nt:unstructured"
                    text="Parent"
                    value="2"/>
                <three
                    jcr:primaryType="nt:unstructured"
                    text="Administrator"
                    value="administratorLookingFor"/>
                <four
                    jcr:primaryType="nt:unstructured"
                    text="Partner"
                    value="partnerLookingFor"/>
            </options>
        </selectList>
    </items>
</jcr:root>

Translate
Kunal_Gaba_
Kunal_Gaba_Accepted solution
New Member
Jan 14, 2016 7:14 PM UTC

For this use case you need to create a node cq:template of the type nt:unstructured under your component.  Please go through the following blog for more details - 

http://blogs.adobe.com/experiencedelivers/experience-management/defaults-in-your-component/

Translate
brahma_RAuthor
Level 2
Jan 16, 2016 10:48 AM UTC

Hello kunal23,

 

Thanks Man, It's really working fine...........

Translate