Hi,
We need to have a dropdown with multi selection on metada schema.
The dropdown one we have on the schema editor it only allows the one for single selection.
I know the widget for coral ui we can set that. I tried editing the node on crxde lite and set the property multiple to false, and it rendered allowing multiple selection.
I'd like to know if this is a good practice or not.
Is there any recommendation on this?
Thanks
Solved! Go to Solution.
Views
Replies
Total Likes
"widget for coral ui we can set that. I tried editing the node on crxde lite and set the property multiple to false, and it rendered allowing multiple selection."
Using out of the box components/widgets and modifying them is best practice. One of the best ways to learn AEM is to use ootb components as a starting point.
Views
Replies
Total Likes
One thing I noticed, it is when we update the field on the metadata editor, it removes the property we added on the CRXDE lite.
So, as far as I can see, we can add on the CRXDE Lite, but if the schema is edited the property added will be removed.
Views
Replies
Total Likes
"widget for coral ui we can set that. I tried editing the node on crxde lite and set the property multiple to false, and it rendered allowing multiple selection."
Using out of the box components/widgets and modifying them is best practice. One of the best ways to learn AEM is to use ootb components as a starting point.
Views
Replies
Total Likes
I was able to allow multiselection on dropdown for metadata schema.
In order to do that I need to do the following:
<% ValueMap props = resource.adaptTo(ValueMap.class); String multiple = props.get("multiple", String.class); %> <input type="hidden" name="./items/<%= key %>/multiple" value="<%=multiple != null ? multiple : ""%>">
So, with this change I can add the multiple propety in the node using CRXDE Lite and the change will be persisted even if I change the metadata schema form.
Thanks.
Views
Replies
Total Likes