Expand my Community achievements bar.

SOLVED

Dynamically poplulated selection field breaks after dialog conversion from coral ui 2 to coral ui 3

Avatar

Level 3

I have a multifield component in Coral ui2 and I want to migrated it to Coral ui3.

Post migration the when the I dynamically populated the fields for the dropdown:

var item = {
value : field.value,
content : {
textContent: field.label
}
};
$(this).get(0).items.add(item);

 

I get the dropdown list prepopulated correctly. But the value that was saved does not gets displayed on the reload of the dialog. The dialog always shows the first value which was created dynamically.

 

I see the value is coming from the back-end via the http://localhost:4502/content/we-retail/language-masters/en/men/_jcr_content/root/responsivegrid/tes...

{"jcr:primaryType":"nt:unstructured","jcr:createdBy":"admin","jcr:lastModifiedBy":"admin","jcr:created":"Mon Jul 27 2020 22:52:08 GMT+0530","jcr:lastModified":"Tue Jul 28 2020 00:58:58 GMT+0530","sling:resourceType":"weretail/components/content/testcomponent-ui","rule":{"jcr:primaryType":"nt:unstructured","item0":{"jcr:primaryType":"nt:unstructured","country":"us"}}}

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@shaileshb584084 

Yeah, you are right this is known issue while converting coral 2- coral 3 cq:dialog.

Sometimes we need to manually update the cq:dialog for better result. 

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

@shaileshb584084 

Yeah, you are right this is known issue while converting coral 2- coral 3 cq:dialog.

Sometimes we need to manually update the cq:dialog for better result. 

Avatar

Community Advisor

Hi @shaileshb584084,

Can you provide below inputs to debug further

  • Updated dialog (Post conversion to Coral UI 3)
  • Dynamic dropdown source (from where you are populating the dropdown)