Checkbox inside Multifield Touch UI

Avatar

Avatar

siddupatil

Avatar

siddupatil

siddupatil

19-07-2017

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.

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

siddupatil

Avatar

siddupatil

siddupatil

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

Answers (1)

Answers (1)

Avatar

Avatar

Techaspect_Solu

Avatar

Techaspect_Solu

Techaspect_Solu

20-07-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:

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/