Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save schatterjee4/9389636ea99ef9dba8a42d992fe70c0b to your computer and use it in GitHub Desktop.
Save schatterjee4/9389636ea99ef9dba8a42d992fe70c0b to your computer and use it in GitHub Desktop.
AEM Touch UI component dialog checkboxes
<!-- Checked checkbox will result in a String property of "true" -->
<myCheckbox
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/form/checkbox"
text="My Checkbox"
name="./myCheckbox"
value="true"/>
<!-- Checked checkbox will result in a Boolean property of true-->
<myBooleanCheckbox
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/form/checkbox"
text="My Boolean Checkbox"
name="./myBooleanCheckbox"
value="true"/>
<myBooleanCheckboxType
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/form/hidden"
name="./myBooleanCheckbox@TypeHint"
value="Boolean"/>
<!-- Checkbox defaults to checked and saves a Boolean value of true -->
<myCheckbox
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/form/checkbox"
text="My Checkbox"
name="./myCheckbox"
value="true"
checked="true"/>
<myCheckboxType
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/form/hidden"
name="./myCheckbox@TypeHint"
value="Boolean"/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment