Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.

Metadata Schema Editor, checkbox field?

Avatar

Level 2

Hi all. In 6.2 ootb there is no Checkbox field available in the Metadata Schema Editor. However upon closer inspection, file /libs/dam/gui/coral/components/admin/schemaforms/formbuilder/builditems.jsp has it commented out. If I overlay this file and uncomment, it becomes available, and seems to function, but upon further testing, is not functional, as values do not save out properly to JCR.

Anyone know what's up with this? Is this going to be addressed soon? Seems a little weird that this basic field missed the cut in an otherwise well thought-out editor. Is it up to the implementer to fix this?! Any advice appreciated.

8 Replies

Avatar

Level 10

Thats defn looks strange !! Can you please raise a support ticket for the same ?

Avatar

Level 2

Thanks for your reply. I don't have Daycare access though so I can't raise a ticket. Hoping to get support in this forum...

Avatar

Level 10

Sure.. Lets me see if I can get some help from the team.

Avatar

Administrator

mtremblay33 wrote...

Thanks for your reply. I don't have Daycare access though so I can't raise a ticket. Hoping to get support in this forum...

 

 

Thanks for your reply. I don't have Daycare access though so I can't raise a ticket. Hoping to get support in this forum...

I would request to to contact your admin to raise the ticket :- https://daycare.day.com/home/createaticket.html 

It helps in tracking.

Thanks and Regards

Kautuk Sahni



Kautuk Sahni

Avatar

Level 2

I have the same issue with 6.1SP2.

For the sake of testing I have overlayed /apps/dam/content/schemaeditors/forms/default/image/jpeg/.content.xml with the following content (checkbox definition is taken from http://www.nateyolles.com/blog/2015/11/aem-checkboxes-using-sling-post-servlet):

<?xml version="1.0" encoding="UTF-8"?> <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:sling="http://sling.apache.org/jcr/sling/1.0" jcr:primaryType="sling:Folder" type="text"> <items jcr:primaryType="nt:unstructured"> <tabs jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/foundation/container"> <items jcr:primaryType="nt:unstructured"> <tab1 jcr:title="Basic" tabid="f84cc8d6-60ab-474e-bdf8-a0b7a434f289" jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/foundation/section"> <items jcr:primaryType="nt:unstructured"> <col1 jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/foundation/container"> <items jcr:primaryType="nt:unstructured"> <myCheckbox jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/foundation/form/checkbox" text="My Checkbox" name="./jcr:content/metadata/myCheckbox" renderReadOnly="{Boolean}true" value="true"/> </items> </col1> </items> </tab1> </items> </tabs> </items> </jcr:root>

Whenever I save the dialog the value is written out as Boolean true even if the checkbox is unchecked.

Any idea what is happening here?

Avatar

Level 2

Hey kristof – I ended up going down a rabbit hole with Daycare that left me... unimpressed. Let's leave it at that. Perhaps a solution was found but I ended up leaving the implementation for this particular project.

Regardless, having to go to support to hotfix a pretty basic use-case (a checkbox!), in my eyes, signifies that the functionality (Metadata Schema Editor and DAM UI rehaul) was simply not finished in time. (comments in source code back me up here). The Granite and CoralUI 2/3 documentation is unhelpful.

Have you considered using a dropdown with Yes/No values? It was the intermediary fix we put in place and was working sufficiently well.

Hope this helps –Matt

Avatar

Level 2

Yes, I guess a dropdown will have to do for now assuming those work. Thanks for the reply!

Avatar

Level 2

To make it work:

  1. Overlay /libs/dam/gui/coral/components/admin/metadataeditor/clientlibs/metadataeditor/js/form.js
  2. In form.js replace the following in line #514 if($checkbox.is(":checked")){ with if(checkbox.hasAttribute("checked")){
  3. Test it again. Now you can see the checkbox is selected.