Recently we have upgraded from AEM 6.5.9 to AEM 6.5.20.
Until now all the multifield what is used in our project are "granite/ui/components/foundation/form/multifield", whose content.xml and jcr properties are similar to following:
xml:
<general_userFilters
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/form/multifield"
composite="{Boolean}true"
fieldLabel="User Filters">
<field
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/form/fieldset"
acs-commons-nested=""
name="./userFiltersTouch">
<layout
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/layouts/fixedcolumns"
method="absolute"/>
<items jcr:primaryType="nt:unstructured">
<column
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/container">
<items jcr:primaryType="nt:unstructured">
<field1
granite:class="userparenttag"
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/form/select"
id="parentTag"
name="./userParentTag">
<datasource
jcr:primaryType="nt:unstructured"
sling:resourceType="/apps/abcd/components/par/datasource"/>
</field1>
<field2
granite:class="childTag"
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/form/textfield"
fieldLabel="Question"
name="./question"/>
</items>
</column>
</items>
</field>
</general_userFilters>
Node structure:
Now the problem after upgrade is, when the dialogue is reopen, the previous data is not reflected and if we save the dialogue values now, the previous data is lost.
To overcome this issue the solution we,ve in mind is to make multifield and its child fields as /coral/foundation, granite/ui/components/coral/foundation/form/multifield.
As the field is composite, the values are now getting stored as nodes item1, item2 etc.... But the earlier data is still not reflecting. All previous data remains intact but of no use.
So to overcome this we have written a servlet which converted all previous node properties "userFiltersTouch" to nodes item like:
With this all previous data is restored in the dialogue and it is working as required. Also the rendering logic is changed to update html pages.
The query is :
We have lots of projects and pages which is using "granite/ui/components/foundation/form/multifield" where previous dialogue data is not reflected and on saving the dialogue, previous data is overridden with empty fields and data is lost. The multifield structure is intact but with no previous data.
How should we proceed with updating the multifield, whose name and fieldset will vary across project and pages. Should we report to ADOBE or go with the customization . If we go with the customization, what will be the best approach?
The current servlet which has been written can be made to read multifield name and its fieldset name , so that it will be compatible with other multifield, but here also the work has to be done on individual page and project basis. Lot of rework and rendering logic change.
Is there a way we can make change directly at multifield level?
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @MaheshKPati
Please check https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/migrate-coral-ui-2-multifi...
ACS Common does not support Coral3 json storage: https://github.com/Adobe-Consulting-Services/acs-aem-commons/issues/1013
Hi @MaheshKPati ,
Going with customization or by using ""granite/ui/components/coral/foundation/form/multifield." will give you advantage of adding multiple type of fields inside one item of multifield like you can add textfield, dropdown, RTE, etc.
Also when you say your data is being lost is mostly because you have updated the value of sling:resourceType from granite/ui/components/foundation/form/multifield" to "granite/ui/components/coral/foundation/form/multifield."
Please check your browser console for any JS error when you open existing multifield after upgrade from AEM 6.5.9 to AEM 6.5.20.
Thanks
Tarun
Thanks @TarunKumar for the reply and information. With same resourceType only, previous dialogue data is not prepopulating, hence the resource type is updated and tested and the behaviour is mentioned above.
We have decided to go with the migration and make all multifield as coral3.
Hi @MaheshKPati
Please check https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/migrate-coral-ui-2-multifi...
ACS Common does not support Coral3 json storage: https://github.com/Adobe-Consulting-Services/acs-aem-commons/issues/1013
@MaheshKPati Did you find the suggestions from users helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies