Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save sbmvenancio/325bc5b74ec5decc046912c3ce5e1679 to your computer and use it in GitHub Desktop.

Select an option

Save sbmvenancio/325bc5b74ec5decc046912c3ce5e1679 to your computer and use it in GitHub Desktop.
AEM Classic UI component dialog checkboxes using the selection xtype
<!-- Checked checkbox will result in a String property of "true" -->
<myCheckbox
jcr:primaryType="cq:Widget"
fieldLabel="My Checkbox"
name="./myCheckbox"
type="checkbox"
xtype="selection"/>
<!-- Checked checkbox will result in a Boolean property of true-->
<myBooleanCheckbox
jcr:primaryType="cq:Widget"
fieldLabel="My Boolean Checkbox"
name="./myBooleanCheckbox"
checkboxBoolTypeHint="{Boolean}true"
type="checkbox"
xtype="selection"/>
<!-- Checked checkbox will result in a Boolean property of true-->
<myBooleanCheckbox
jcr:primaryType="cq:Widget"
fieldLabel="My Boolean Checkbox"
name="./myBooleanCheckbox"
type="checkbox"
xtype="selection"/>
<myBooleanCheckboxType
jcr:primaryType="cq:Widget"
ignoreData="{Boolean}true"
name="./myBooleanCheckbox@TypeHint"
value="Boolean"
xtype="hidden"/>
<!-- Checkbox defaults to checked Boolean value of true -->
<myCheckbox
jcr:primaryType="cq:Widget"
fieldLabel="My Checkbox"
name="./myCheckbox"
value="true"
defaultValue="true"
checkboxBoolTypeHint="{Boolean}true"
type="checkbox"
xtype="selection"/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment