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
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

ACS Commons 3.19.0, Classic UI to Touch UI Checkbox

AEMWizard
Level 3
Level 3

Hi.

I have a problem here where classic ui is saving the "checkbox" dialogue value to. String[] { "true" } or known as, [ "true" ]. When I try to render the Touch UI granite "checkbox" component, the check box field is not showing the correct check/uncheck state; this is because Touch UI expects just the string "true", and not String[] { "true"} or [ "true" ].

Classic UI have been used for many years within our organisation, and for multi-fields, String[] { "true"} or [ "true" ] are stored everywhere.

How do I ensure that my Touch UI granite "checkbox" component is showing the correct check/uncheck state, when the value in the JCR is String[] { "true" } or [ "string" ].

 

1 Accepted Solution
vanegi
Correct answer by
Employee
Employee

Please refer to https://helpx.adobe.com/experience-manager/6-5/sites/developing/using/reference-materials/granite-ui.... You can try below sample, this perfectly works for me:

 

In Dialog:
<myCheckbox
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/form/checkbox"
name="./selected" text="Show Checkbox Value"
uncheckedValue="false"
value="{Boolean}true"/>
In Html:
<h1 data-sly-test.selected="${properties.selected}" >${selected}</h1>

 

View solution in original post

1 Reply
vanegi
Correct answer by
Employee
Employee

Please refer to https://helpx.adobe.com/experience-manager/6-5/sites/developing/using/reference-materials/granite-ui.... You can try below sample, this perfectly works for me:

 

In Dialog:
<myCheckbox
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/form/checkbox"
name="./selected" text="Show Checkbox Value"
uncheckedValue="false"
value="{Boolean}true"/>
In Html:
<h1 data-sly-test.selected="${properties.selected}" >${selected}</h1>

 

View solution in original post