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

AEM 6.5 Content Fragments not saving data in a multi-select dropdown enumeration type

erickteowarang
Level 1
Level 1

Hi community, 

I've created an enumeration type for a Content Fragment I made with the multiple option set to true. Unfortunately even though the UI appears fine and I am able to select multiple options, after I click save, nothing happens. 

The XML structure of the field:

<countries
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/select"
fieldLabel="Countries"
metaType="enumeration"
multiple="{Boolean}true"
name="regions"
options="Australia, New Zealand, United Kingdom, United States, Canada"
renderReadOnly="false"
required="on"
showEmptyInReadOnly="true"
valueType="string[]">

 Am I doing something wrong or is the multi-select not currently supported in CFs?

AEM 6.5 content fragments
1 Accepted Solution
Vijayalakshmi_S
Correct answer by
Community Advisor
Community Advisor

Hi @erickteowarang,

Content Fragment Model Editor UI (as we navigate via Tools -> Assets -> Content Fragment Models) has no option to enable multiple options/set multiple -> true for Enumeration

Are you making this change directly in the dialog via CRXDE ?

Note : I checked in AEM 6.5.0

View solution in original post

5 Replies
Vijayalakshmi_S
Correct answer by
Community Advisor
Community Advisor

Hi @erickteowarang,

Content Fragment Model Editor UI (as we navigate via Tools -> Assets -> Content Fragment Models) has no option to enable multiple options/set multiple -> true for Enumeration

Are you making this change directly in the dialog via CRXDE ?

Note : I checked in AEM 6.5.0

View solution in original post

erickteowarang
Level 1
Level 1
HI @Vijayalakshmi_S, yes I updated it directly in the code to test it. Our team does not use the Content Fragment Model Editor UI and have our own tool to generate the XML for our components. I noticed that the enumeration type was using the Granite UI for the Select, which had a multiple option but apparently it's unsupported.
Vijayalakshmi_S
Community Advisor
Community Advisor

Hi @erickteowarang,

Thanks for the inputs. Yes it does use Granite UI Select which supports multiple in general, but not in the context of Content Fragments.

(On a high level check from backend, could see that select resource is included/handled for specific set of possible properties alone)

Arun_Patidar
Community Advisor
Community Advisor

Hi,

I don't think so if multiple option is supported.

I tried with 

valueType="string[] 

and with

valueType="string

 It works only with single value though you can select multiplöe but only first values is getting stored.

erickteowarang
Level 1
Level 1

Hey Arun,

 

Yeah I tried using valueType="string" as well but like you said, it only saves the first one which indicates that it's unsupported. 

 

Thanks for checking.