Checkbox inside Multifield Touch UI | Community
Skip to main content
siddupatil
Level 2
July 20, 2017
Solved

Checkbox inside Multifield Touch UI

  • July 20, 2017
  • 2 replies
  • 2557 views

Hi,

I am using AEM 6.2. I am trying to develop touch ui for the components. I am facing problem with checkbox in the multifield. The sling:resourceType for checkbox i am using is "granite/ui/components/foundation/form/checkbox", gave value = true.

When i looked in to the page data in CRXDE, the field is saving like this "checkss":["true"],

Always checkbox value is getting saved inside another square bracket. I am not sure how to avoid that.

Please reply with thoughts.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by siddupatil

Added deleteHint="{Boolean}false to dialog now value is stored in JCR - "isOpenInNewWindow": "true",

<isOpenInNewWindow

jcr:primaryType="nt:unstructured"

sling:resourceType="granite/ui/components/foundation/form/checkbox"

fieldLabel="Open In New Window"

name="./isOpenInNewWindow"

text="Open In New Window"

checked="{Boolean}false"

value="{Boolean}true"

deleteHint="{Boolean}false"/>

2 replies

Techaspect_Solu
Level 7
July 20, 2017

Hi siddupatil,

  1. Install ACS-COMMONS by following article[1]. It would allow the multifield values to be stored via nodestore/jsonstore.
    Below are the Steps to be followed to create a multifield with acs-commons. We can persist values via
    NODE_STORE (refer article [2])
    and
    JSON_STORE (refer article [3])
  2. Configure ‘value’ configuration for the checkbox as indicated below:

<fieldName

jcr:primaryType="nt:unstructured"

sling:resourceType="granite/ui/components/foundation/form/checkbox"

name="./checkbox"

text="open in new tab"

value="true"/>
Verify the checkbox by checking, saving dialog and reopening dialog again.

For Reference, follow below links:

[1] Adobe AEM Commons
[2] acs-aem-commons/touchui-composite-multifield-nodestore.js at master · Adobe-Consulting-Services/acs-aem-commons · GitHub

[3] acs-aem-commons/touchui-composite-multifield.js at master · Adobe-Consulting-Services/acs-aem-commons · GitHub

Thank You,
Techaspect Solutions.

http://www.techaspect.com/

siddupatil
siddupatilAuthorAccepted solution
Level 2
July 20, 2017

Added deleteHint="{Boolean}false to dialog now value is stored in JCR - "isOpenInNewWindow": "true",

<isOpenInNewWindow

jcr:primaryType="nt:unstructured"

sling:resourceType="granite/ui/components/foundation/form/checkbox"

fieldLabel="Open In New Window"

name="./isOpenInNewWindow"

text="Open In New Window"

checked="{Boolean}false"

value="{Boolean}true"

deleteHint="{Boolean}false"/>