Hi,
I am working on a component which uses multifield to get dynamic input from authors. I have one component and javascript file using javascript use api. Author can add items dynamically and remove them. But problem occurs when there is only one value.
I tried to debug the js code and I identified that
Looks like when only one value is stored in a node then it is stored as one format, but whereas if there are multiple values then its seems to be saved in different format.
Can anyone tell me how to fix this ?
Thank you.
Views
Replies
Total Likes
I am not sure there is anything to fix - i have placed a single item in a MF control (meaning only 1 MF is filled out) and it works fine- as shown here:
This single value is written to the web page and it is stored in the dialog.
Are you seeing either of these conditions when using a single value:
1 - the value is not written to the web page.
2 - the value is not persisted in the dialog - that is - it disappears when you close and re-open the dialog?
Views
Replies
Total Likes
For those community members reading this thread and want to know how to develop a MF dialog - see this community article:
https://helpx.adobe.com/experience-manager/using/mf_htl61.html
6.2 - https://helpx.adobe.com/experience-manager/using/htl_multifield62.html
Video - https://youtu.be/iKVGlo3iM-o
Views
Replies
Total Likes
Hi,
I am using JavaScript Use API. And in that I am facing this issue. I have another java component with similar functionality and it works properly.
Thank you.
Views
Replies
Total Likes
I would use Java that extends WCMUSePojo. When comparing using compiled code in an OSGi vs interrupted JS - i would always recommend using Java.
Views
Replies
Total Likes
Thank you. I am also using Java that extends WCMUSePojo for all components. But for UI deveopers, JavaScript would be a better option. So trying to use JavaScript UI code. Is it a bug ? Or data storage & data retrieval or different type conversion problem ?
Thank you.
Views
Replies
Total Likes
Seems like a bug - open a ticket.
Views
Replies
Total Likes
Can you make a small reproducible case/code, and share this?
Views
Replies
Total Likes
Can you try to convert the value in JS-code, like what I am doing here to convert string->number
"use strict";
use(function () {
var count = properties["columCount"];
return new Array(Number(count));
});
Views
Replies
Total Likes