Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.

In Touch UI Checkbox, check mark is not getting populated in dialog , when it is reopened after checking the check box once.

Avatar

Level 4

I have checked the checkbox in dialog(Touch UI), and the content node value is getting updated as true. But when i reopen the dialog, check mark is not getting populated. 

I have tried the other way round, by setting the checkbox marked as true by default. so when i open the dialog, i could see the check mark, but if i unchecked the same and save, it is not getting deselected, next time when i open the dialog.

 

the content.xml is like this

  <isBorderRequired
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/form/checkbox"
fieldDescription="If checked, border line will be added ."
name="./isBorderRequired"
text="Display Border ?"
value="true"/>
<isborderrequired-delete
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/form/hidden"
name="./isBorderRequired@Delete"
value="{Boolean}true"/>     

3 Replies

Avatar

Administrator

Hi 

Please have a look at these couple of forum posts discussion similar problems:

Link:- http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manage...

// The problem was :- Touch Ui checkbox, how to get it unchecked while reopening the dialog.

The approach is that the member involves using cq:template to prefill the resource with a checked value. Just needed to make sure that the name of the value you are saving, and the value that is set when checked are present in the cq:template.

Link:- http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manage...

// Touch UI : how to set default value of checkbox in touch UI

I hope this would help you.

~kautuk



Kautuk Sahni

Avatar

Level 4

I have tried these approaches,but that doesn't work for me. Please find the atttached cq:dialog content.xml.  there are 3 checkboxes in total, 2 inside a field set(isbutton,hidenonlogin) and 1 outside(isBorderRequired). The one outside fieldset is working as expected. The two is having the issue.

Hi Guys, 

We are also facing a similar issue, did you guys found any solution to this problem. We are using AEM-6.1. As per the comments provided in AEM out of the box Checkbox touch UI JSP  /libs/granite/ui/components/foundation/form/checkbox/checkbox.jsp

warning:: When setting ``defaultChecked`` = ``true``, you have to set the value of ``uncheckedValue`` so that the form values will be always populated.Otherwise Sling Post Servlet will remove the property from the form values, which makes the checkbox to be always checked.

We have set all the properties mentioned in the comment still it is not working

Thanks

Ritika