Expand my Community achievements bar.

SOLVED

AEM coral checkbox equivalent of ExtJs

Avatar

Level 7

Hi All,

 

I have a AEM 6.0 ExtJs checkbox group as:

 

 

 

<recurrentDays
    jcr:primaryType="cq:Widget"
    allowBlank="{Boolean}true"
    fieldLabel="Repeats on..."
    name="recurrenceDays"
    type="checkbox"
    xtype="selection"
    value="0">
    <options jcr:primaryType="cq:WidgetCollection">
        <o1
        jcr:primaryType="nt:unstructured"
        text="Sunday"
        value="1"/>
        <o2
        jcr:primaryType="nt:unstructured"
        text="Monday"
        value="2"/>
        ...
        <o7
        jcr:primaryType="nt:unstructured"
        text="Saturday"
        value="7"/>
    </options>
</recurrentDays>                                       

 

 

 

The checkboxes use one name only, so that it will store a comma-delimited string value in /crx/de, such as "1,2", if Sunday and Monday are checked. What's equivalent in Granite/Coral? I try checkbox/selection but no luck. I try to migrate the code as much as possible so I would not have to modify the code in the Sling Model. 

 

Thanks!

 

-kt

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@kevingtan Please check out the below article for the sample code of setting the coral multi select check box UI. It stores the values in string array which you can read it in Sling model

https://unlocklearning.in/multiple-checkboxes-in-touch-ui-dialog/

 

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

@kevingtan Please check out the below article for the sample code of setting the coral multi select check box UI. It stores the values in string array which you can read it in Sling model

https://unlocklearning.in/multiple-checkboxes-in-touch-ui-dialog/