Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

Dynamically set default value in Select widget

Avatar

Former Community Member

Hi,

I have a select widget for which the values in options are coming from a servlet call.I want the default value for the select widget to be the first value returned in the json from the servlet.

This is the videoPlayerPL select widget defined and I am getting the options from the servlet.

 <videoPlayerPL
                        jcr:primaryType="cq:Widget"
                        allowBlank="false"
                        fieldDescription=""
                        fieldLabel="Account:"
                        fieldSubLabel=""
                        name="./bcAccount"
                        options="/libs/brightcoveaccountlist"
                        optionsQTipField="name"
                        optionsTextField="name"
                        type="select"
                        xtype="selection">
                        <optionsConfig
                            jcr:primaryType="nt:unstructured"
                            editable="{Boolean}true"/>
                    </videoPlayerPL>

1 Accepted Solution

Avatar

Correct answer by
Level 10
1 Reply

Avatar

Correct answer by
Level 10

Hi cq5 learner, 

Refer at http://forums.adobe.com/thread/1016025

Thanks,
Sham