Expand my Community achievements bar.

SOLVED

Nested Multifield Widget

Avatar

Level 10

Hello,

We have a requirement for a nested multifield widget wherein  we could have n number of Categories and each of those categories can have n number of subcategories.

Please let me know if someone has a solution to such a scenario

Regards,

1 Accepted Solution

Avatar

Correct answer by
Level 10
8 Replies

Avatar

Level 10

There is an older community thread that talks about this subject:

https://forums.adobe.com/thread/1235627?tstart=0

Avatar

Level 10

Sham HC wrote...

http://experience-aem.blogspot.com/2015/02/aem-6-sp2-touch-ui-multi-field-component.html

 

Hello Sham/Scott

This is what i am looking forward to achieve, attaching the screenshot

Avatar

Level 10

smacdonald2008 wrote...

There is an older community thread that talks about this subject:

https://forums.adobe.com/thread/1235627?tstart=0

 

I agree Scott, looks like the suggestion did not work either. I used the multifield panel from adobe acs commons, which stores values as a json, works fine for a single multifield, but with nested multifield, we see that the category names appear in one json, while the sub category names appear in another json which does not have any mapping to the outer category. Hence the dialog does not even display the inner category values when opened up post edit and save.

Avatar

Correct answer by
Level 10

Here is a community article that talks about this use case:

https://helpx.adobe.com/experience-manager/using/nested_multifield.html

Avatar

Level 10

There are no docs or even recommendations on this use case.

I am looking internally to see if this use case can be answered one way or another.

Either they are supported and there should be an example and documented or they are not supported. 

Avatar

Level 10

smacdonald2008 wrote...

Take a look at the code here:

http://adobe-consulting-services.github.io/acs-aem-commons/features/widgets.html

This may help. 

 

Thank you Scott for taking a look at this, I actually am using the same multifield widget, now it works for one level deep multifield entries, storing them in a json format,This works fine for a non-nested multifield category_tab/items/fixedlist/fieldConfig/items/categoryname, where categoryname is a textfield type, and this outer fixedlist here has a property name = ./category.

 But moment i try to nest by adding a multifield entry as shown

category_tab/items/fixedlist/fieldConfig/items/fixedlist/fieldConfig/items/link where link is of xtype textfield,and inner fixedlist has a property name= ./sub_category there are two JSON's that get stored , 

category JSON  string= {"category":"CATEGORY1"},{"category":"CATEGORY2"} representing outer fixedlist

subcategories JSON string ={"subcategorylink":"Link1"},{"subcategorylink":"Link2"}

without any mapping to which categories the links belong, due to which when i open up the dialog again,  i see the Category1 and category2 displayed properly in the dialog, but the rest of the entries taht was keyed in are no longer available.