Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Checkbox inside Multifield Touch UI

siddupatil
Level 2
Level 2

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.

1 Accepted Solution
siddupatil
Correct answer by
Level 2
Level 2

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"/>

View solution in original post

2 Replies
Techaspect_Solu
Level 7
Level 7

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:

checkbox-6.2.PNG

<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-...

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

Thank You,
Techaspect Solutions.

http://www.techaspect.com/

siddupatil
Correct answer by
Level 2
Level 2

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"/>

View solution in original post