4 Replies Latest reply on Mar 1, 2013 5:47 AM by stejan74

    CQ 5 Default select text in Selection

    Raja_Raju_Learner

      Hi,

       

      I am noew to CQ5. I need to know how to display the --Select-- default value int he selection xtype of CQ5.

       

      Any help will be appreciated.

        • 1. Re: CQ 5 Default select text in Selection
          Sham HC Level 7

          Have you tried using the property 'defaultValue' on the node having xtype as 'selection'.

          • 2. Re: CQ 5 Default select text in Selection
            Raja_Raju_Learner Level 1

            Hi Sham,

             

            Thanks for your input. I will use ‘defaultValue’ and check it out.

             

            Thanks & Regards,

            Raja R

            • 3. Re: CQ 5 Default select text in Selection
              kand12345 Level 1

              I am also having an issue with this.

               

              Given the following structure in my dialog.xml:

              <someSelect

                   name="someSelect"

                   fieldLabel="Here are some options"

                   type="select"

                   xtype="selection"

                   defaultValue="value1"

                   allowBlank="false"

                   jcr:primaryType="cq:Widget">

                          <options jcr:primaryType="cq:WidgetCollection">

                                   <option1

                                          jcr:primaryType="nt:unstructured"

                                          text="Option 1"

                                          value="value1"/>

                                   <option2

                                           jcr:primaryType="nt:unstructured"

                                           text="Option 2"

                                           value="value2" />

                          </options>

              </someSelect>

              I tried putting these properties on my select:

              defaultValue="0"

              defaultValue="1"

              defaultValue="value1"

              activeItem="0"

              activeItem="1"

              And none of these will set the first option, or any option, as the default for the select.

               

              What am I missing here??

              • 4. Re: CQ 5 Default select text in Selection
                stejan74

                I had the same problem but now i found it.

                I don't know if you need this information but for others it's perhabs helpful.

                You have to set the value property then it works.

                 

                <someSelect

                     value="value1"

                     defaultValue="value1"