creating multiple checkbox for single property of string array for touch ui in AEM6.3 (Coral) | Community
Skip to main content
srinivas_chann1
Level 7
Jul 15, 2019 7:03 PM UTC
Solved

creating multiple checkbox for single property of string array for touch ui in AEM6.3 (Coral)

Hi,

In Classic UI we could created multiple checkbox using selection xtype

<multiplecheckbox

                            jcr:primaryType="cq:Widget"

                            allowBlank="{Boolean}true"

                            disabled="{Boolean}false"

                            fieldLabel="Industries"

                            hideLabel="{Boolean}false"

                            name="./tagging"

                            options="/apps/project/components/content/abc/xyz.json"

                            type="checkbox"

                            xtype="selection"/>

now under /apps/project/components/content/abc/xyz.json  the value could

[

{"text": "tag1", "value": "tag1"},

{"text": "tag2", "value": "tag2"},

{"text": "tag3", "value": "tag3"},

]

Now when the dialog is submitted this will store under property tagging as String array.

Please let me know how i could achieve the same using touch ui. Any samples would help

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
vipins5188
vipins5188Accepted solution
Level 3
Jul 15, 2019 8:30 PM UTC

Hi Srinivas,

We also had multiple checkbox in classic UI which we have replaced with Multi Select Drop down in Touch UI. To get the options value you can create Datasource. You can do something like this.

<multiSelectDropDown              jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/form/select"          emptyText="Select Industry Type"fieldLabel="Industries"

multiple="{Boolean}true"           name="./tagging">                         <datasource                           jcr:primaryType="nt:unstructured"   sling:resourceType="/apps/project/components/content/abc/xyz"/>            </multiSelectDropDown>

To get more details on how to create DataSource you can refer below link.

Adobe Experience Manager Help | Using Granite DataSource objects to populate AEM Touch UI objects

Hope this helps.

Thanks,

Vipin

2 replies

srinivas_chann1
Level 7
Jul 16, 2019 4:07 AM UTC

Thanks Vipin  it was a very helpful suggestion.

But also wanted to know if this can achieved using check-boxes instead of selection in touch ui like it was classic ui as authors will expect the same behavior??

Translate
vipins5188
vipins5188Accepted solution
Level 3
Jul 15, 2019 8:30 PM UTC

Hi Srinivas,

We also had multiple checkbox in classic UI which we have replaced with Multi Select Drop down in Touch UI. To get the options value you can create Datasource. You can do something like this.

<multiSelectDropDown              jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/form/select"          emptyText="Select Industry Type"fieldLabel="Industries"

multiple="{Boolean}true"           name="./tagging">                         <datasource                           jcr:primaryType="nt:unstructured"   sling:resourceType="/apps/project/components/content/abc/xyz"/>            </multiSelectDropDown>

To get more details on how to create DataSource you can refer below link.

Adobe Experience Manager Help | Using Granite DataSource objects to populate AEM Touch UI objects

Hope this helps.

Thanks,

Vipin

Translate