Skip to content

Instantly share code, notes, and snippets.

@nateyolles
Created November 17, 2015 03:18
Show Gist options
  • Save nateyolles/01ac869591c258e1e609 to your computer and use it in GitHub Desktop.
Save nateyolles/01ac869591c258e1e609 to your computer and use it in GitHub Desktop.
AEM Classic UI component dialog checkboxes using the checkbox xtype
<!-- Checked checkbox will result in a String property of "on" -->
<myCheckbox
jcr:primaryType="cq:Widget"
fieldLabel="My Checkbox"
name="./myCheckbox"
xtype="checkbox"/>
<!-- Checked checkbox will result in a Boolean property of true -->
<myBooleanCheckbox
jcr:primaryType="cq:Widget"
fieldLabel="My Boolean Checkbox"
inputValue="true"
name="./myBooleanCheckbox"
xtype="checkbox"/>
<myBooleanCheckboxType
jcr:primaryType="cq:Widget"
ignoreData="{Boolean}true"
name="./myBooleanCheckbox@TypeHint"
value="Boolean"
xtype="hidden"/>
<!-- Checkbox defaults to checked -->
<myBooleanCheckbox
jcr:primaryType="cq:Widget"
fieldLabel="My Boolean Checkbox"
inputValue="true"
name="./myBooleanCheckbox"
checked="{Boolean}true"
xtype="checkbox"/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment