ACS Commons 3.19.0, Classic UI to Touch UI Checkbox

Avatar

Avatar
Boost 1
Level 2
AEMWizard
Level 2

Like

1 like

Total Posts

30 posts

Correct reply

1 solution
Top badges earned
Boost 1
Validate 10
Validate 1
Applaud 5
Affirm 1
View profile

Avatar
Boost 1
Level 2
AEMWizard
Level 2

Like

1 like

Total Posts

30 posts

Correct reply

1 solution
Top badges earned
Boost 1
Validate 10
Validate 1
Applaud 5
Affirm 1
View profile
AEMWizard
Level 2

23-03-2020

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

 

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Give Back 5
Employee
vanegi
Employee

Likes

392 likes

Total Posts

378 posts

Correct reply

148 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back 10
Give Back
Boost 50
View profile

Avatar
Give Back 5
Employee
vanegi
Employee

Likes

392 likes

Total Posts

378 posts

Correct reply

148 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back 10
Give Back
Boost 50
View profile
vanegi
Employee

14-07-2020

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>

 

Answers (0)