Expand my Community achievements bar.

SOLVED

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

Avatar

Level 8

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

1 Accepted Solution

Avatar

Correct answer by
Level 3

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

View solution in original post

2 Replies

Avatar

Correct answer by
Level 3

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

Avatar

Level 8

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