How to set default value in a Touch UI select element?

andrew_bowles

02-11-2015

I am trying to set the defaultValue in a Touch UI select dropdown. Setting "defaultValue" in dialog.xml works in Classic mode, but not in Touch. Here is the relevant snippet from my component's .content.xml <alignment jcr:primaryType="cq:Widget" sling:resourceType="granite/ui/components/foundation/form/select" fieldLabel="Alignment" name="./alignment" value="option2" defaultValue="option2"> <items jcr:primaryType="cq:WidgetCollection"> <topLeft jcr:primaryType="nt:unstructured" text="Option 1" value="option1"/> <topCenter jcr:primaryType="nt:unstructured" text="Option 2" value="option2"/> <topRight jcr:primaryType="nt:unstructured" text="Option3" value="option3"/> </items> </alignment>
View Entire Topic