Last active
July 5, 2022 15:53
-
-
Save nateyolles/ec41b7e66a9600cbaeb6 to your computer and use it in GitHub Desktop.
AEM Classic UI component dialog checkboxes using the selection xtype
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- 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