I am working on AEM products. I have a multifield component in a dialog. After adding it then saving it resulted in unexpected structure of the nodes on sp2. But it is working fine on sp2. Below is the comparison of the node structure of sp2 and sp3 after performing the same steps(adding item 3).
on SP2:
<item2
jcr:lastModified="{Date}2019-08-22T17:17:02.548+05:30"
jcr:primaryType="nt:unstructured"
contentTitle="This is title"
enabled="Y"/>
<item3
jcr:lastModified="{Date}2019-08-22T17:17:02.547+05:30"
jcr:primaryType="nt:unstructured"
fieldsCheckOne="agree"
fieldCheckTwo="agree"
contentTitle="ThisIsLabel"/>
on SP3:
<item2
jcr:lastModified="{Date}2019-08-22T17:10:51.203+05:30"
jcr:primaryType="nt:unstructured">
<contentList
jcr:lastModified="{Date}2019-08-22T17:10:51.204+05:30"
jcr:primaryType="nt:unstructured">
<item3
jcr:lastModified="{Date}2019-08-22T17:10:51.206+05:30"
jcr:primaryType="nt:unstructured"
contentTitle="ThisIsLabel"/>
</contentList>
</item2>
<item3
jcr:lastModified="{Date}2019-08-22T17:10:51.202+05:30"
jcr:primaryType="nt:unstructured"
fieldsCheckOne="agree"
fieldCheckTwo="agree"/>
Because of which when I open the product after save and close, item 3 doesnt have the label and label of item 2 is also erased, in addition to this sometimes empty multifield are also added.
Could you please provide any pointers to resolve this issue.
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
The dialog structure is looks ok. It could be a bug.
Can you please try with minimum fields with multifield, just to check if it is a bug or something wrong with dialog.
Views
Replies
Total Likes
could you please share dialog xml?
Views
Replies
Total Likes
Thank for the reply Arun. Could you please let me know what exactly you want to check in that xml because it is having some company specific data which is not advisable to share. I can give you a dummy structure if you let me know what you exactly looking for in the xml.
edit: One place in question service pack is incorrect. It is working on SP2 and not on SP5. Second node structure is from SP5
Views
Replies
Total Likes
hi,
Just want to check the dialog structure and resource type for fields, Its fine if you can only share demo dialog structure for multifield.
Views
Replies
Total Likes
Hi Arun, PFB the dialog xml.
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
jcr:primaryType="cq:Page">
<jcr:content
cq:targetPath="/var/commerce/products/project-name/product-group/product-name"
jcr:description="First Product"
jcr:primaryType="cq:PageContent"
jcr:title="Product First"
sling:resourceType="wcm/scaffolding/components/scaffolding">
<cq:dialog
jcr:primaryType="nt:unstructured"
jcr:title="ABC Product Properties"
sling:resourceType="cq/gui/components/authoring/dialog">
<content
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/container">
<items jcr:primaryType="nt:unstructured">
<columns
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/fixedcolumns">
<items jcr:primaryType="nt:unstructured">
<column
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/container">
<items jcr:primaryType="nt:unstructured">
<tabs
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/tabs">
<items jcr:primaryType="nt:unstructured">
<aName
jcr:primaryType="nt:unstructured"
jcr:title="A Name"
sling:resourceType="granite/ui/components/coral/foundation/container">
<items jcr:primaryType="nt:unstructured">
<titles
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/fieldset">
<items jcr:primaryType="nt:unstructured">
<id
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
fieldDescription="field description"
fieldLabel="Id"
name="./jcr:title"
renderReadOnly="{Boolean}true"
required="{Boolean}true"/>
<abccode
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
fieldDescription="field description"
fieldLabel="field label"
name="./abccode"
renderReadOnly="{Boolean}true"
required="{Boolean}true"/>
<aid
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
fieldDescription="field description"
fieldLabel="field label"
name="./aid"
renderReadOnly="{Boolean}true"
required="{Boolean}true"/>
<bid
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
fieldDescription="field description"
fieldLabel="field label"
name="./bid"
renderReadOnly="{Boolean}true"
required="{Boolean}true"/>
<cid
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
fieldDescription="Field description"
fieldLabel="field label"
name="./cid"
renderReadOnly="{Boolean}true"
required="{Boolean}false"/>
<aType
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/autocomplete"
fieldDescription="Field description"
fieldLabel="Field Label"
forceSelection="{Boolean}true"
name="./aType"
required="true">
<datasource
jcr:primaryType="nt:unstructured"
sling:resourceType="/bin/appname/servletname"
addNone="{Boolean}true"/>
<options
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/autocomplete/list"/>
</aType>
<aMode
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/autocomplete"
fieldDescription="Field description"
fieldLabel="Field Label"
forceSelection="{Boolean}true"
name="./aMode"
required="true">
<datasource
jcr:primaryType="nt:unstructured"
sling:resourceType="/bin/appname/servletname"
addNone="{Boolean}true"/>
<options
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/autocomplete/list"/>
</aMode>
<aMethod
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/autocomplete"
fieldDescription="FieldDescription"
fieldLabel="FieldLabel"
forceSelection="{Boolean}true"
name="./aMethod"
required="true">
<datasource
jcr:primaryType="nt:unstructured"
sling:resourceType="/bin/appname/servletname"
addNone="{Boolean}true"/>
<options
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/autocomplete/list"/>
</aMethod>
<bMode
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/autocomplete"
fieldDescription="Field Description"
fieldLabel="Field Label"
forceSelection="{Boolean}true"
name="./bMode"
required="true">
<datasource
jcr:primaryType="nt:unstructured"
sling:resourceType="/bin/appname/servletname"
addNone="{Boolean}true"/>
<options
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/autocomplete/list"/>
</bMode>
<bMethod
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/autocomplete"
fieldDescription="Field Description"
fieldLabel="Field Label"
forceSelection="{Boolean}true"
name="./bMethod"
required="true">
<datasource
jcr:primaryType="nt:unstructured"
sling:resourceType="/bin/appname/servletname"
addNone="{Boolean}true"/>
<options
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/autocomplete/list"/>
</bMethod>
<xyz
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/switch"
defaultChecked="N"
disabled="{Boolean}false"
fieldDescription="Field Description"
fieldLabel="Field Label"
name="./xyz"
uncheckedValue="false"
value="true"/>
</items>
</titles>
</items>
</aName>
<aInfo
jcr:primaryType="nt:unstructured"
jcr:title="A Info"
sling:resourceType="granite/ui/components/coral/foundation/container">
<items jcr:primaryType="nt:unstructured">
<titles
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/fieldset">
<items jcr:primaryType="nt:unstructured">
<aItem
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
fieldDescription="Field Description"
fieldLabel="Field Label"
name="./aItem"
renderReadOnly="{Boolean}true"
required="{Boolean}false"/>
<bItem
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
fieldDescription="Field Description"
fieldLabel="Field Label"
name="./bItem"
renderReadOnly="{Boolean}true"
required="{Boolean}false"/>
<cItem
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
fieldDescription="Field Description"
fieldLabel="Field Label"
name="./cItem"
renderReadOnly="{Boolean}true"
required="{Boolean}false"/>
<dItem
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
fieldDescription="Field Description"
fieldLabel="Field Label"
name="./dItem"
renderReadOnly="{Boolean}true"
required="{Boolean}false"/>
<eItem
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
fieldDescription="Field Description"
fieldLabel="Field Label"
name="./eItem"
renderReadOnly="{Boolean}true"
required="{Boolean}false"/>
</items>
</titles>
</items>
</aInfo>
<bInfo
jcr:primaryType="nt:unstructured"
jcr:title="B Info"
sling:resourceType="granite/ui/components/coral/foundation/container">
<items jcr:primaryType="nt:unstructured">
<titles
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/fieldset">
<items jcr:primaryType="nt:unstructured">
<multifield
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/multifield"
composite="{Boolean}true"
fieldDescription="Field Description"
fieldLabel="Field Label">
<field
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/container"
name="./controlList">
<items jcr:primaryType="nt:unstructured">
<aItem
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/autocomplete"
fieldDescription="Field Description"
fieldLabel="Field Label"
forceSelection="{Boolean}true"
name="./aItem"
required="true">
<datasource
jcr:primaryType="nt:unstructured"
sling:resourceType="/bin/appname/servletname"
addNone="{Boolean}true"/>
<options
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/autocomplete/list"/>
</aItem>
<bItem
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/autocomplete"
fieldDescription="Field Description"
fieldLabel="Field Label"
forceSelection="{Boolean}true"
name="./bItem"
required="true">
<datasource
jcr:primaryType="nt:unstructured"
sling:resourceType="/bin/appname/servletname"
addNone="{Boolean}true"/>
<options
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/autocomplete/list"/>
</bItem>
<cItem
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/autocomplete"
fieldDescription="Field Description"
fieldLabel="Field Label"
forceSelection="{Boolean}true"
name="./cItem"
required="false">
<datasource
jcr:primaryType="nt:unstructured"
sling:resourceType="/bin/appname/servletname"
addNone="{Boolean}true"/>
<options
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/autocomplete/list"/>
</cItem>
<dItem
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
fieldDescription="Field Description"
fieldLabel="Field Label"
name="./dItem"
renderReadOnly="{Boolean}false"
required="{Boolean}false"/>
<eItem
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
fieldDescription="Field Description"
fieldLabel="Field Label"
name="./eItem"
renderReadOnly="{Boolean}true"
required="{Boolean}false"/>
<fItem
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
fieldDescription="Field Description"
fieldLabel="Field Label"
name="./fItem"
renderReadOnly="{Boolean}true"
required="{Boolean}false"/>
<gItem
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/autocomplete"
fieldDescription="Field Description"
fieldLabel="Field Label"
forceSelection="{Boolean}true"
name="./gItem"
required="false">
<datasource
jcr:primaryType="nt:unstructured"
sling:resourceType="/bin/appname/servletname"
addNone="{Boolean}true"/>
<options
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/autocomplete/list"/>
</gItem>
<hItem
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/switch"
defaultChecked="N"
disabled="{Boolean}false"
fieldDescription="Field Description"
fieldLabel="Field Label"
name="./hItem"
uncheckedValue="N"
value="Y"/>
</items>
</field>
</multifield>
</items>
</titles>
</items>
</bInfo>
<cInfo
jcr:primaryType="nt:unstructured"
jcr:title="C Info"
sling:resourceType="granite/ui/components/coral/foundation/container">
<items jcr:primaryType="nt:unstructured">
<titles
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/fieldset">
<items jcr:primaryType="nt:unstructured">
<multifield
jcr:primaryType="nt:unstructured"
sling:resourceType="/libs/granite/ui/components/coral/foundation/form/multifield"
composite="{Boolean}true"
fieldDescription="Field Description"
fieldLabel="Field Label">
<field
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/container"
name="./consentList">
<items jcr:primaryType="nt:unstructured">
<aItem
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/autocomplete"
fieldDescription="Field Description"
fieldLabel="Field Label"
forceSelection="{Boolean}true"
name="./aItem"
required="true">
<datasource
jcr:primaryType="nt:unstructured"
sling:resourceType="/bin/appname/servletname"
addNone="{Boolean}true"/>
<options
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/autocomplete/list"/>
</aItem>
<bItem
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
fieldDescription="Field Description"
fieldLabel="Field Label"
name="./bItem"
renderReadOnly="{Boolean}true"
required="{Boolean}true"/>
<cItem
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/autocomplete"
fieldDescription="Field Description"
fieldLabel="Field Label"
forceSelection="{Boolean}true"
name="./cItem"
required="false">
<datasource
jcr:primaryType="nt:unstructured"
sling:resourceType="/bin/appname/servletname"
addNone="{Boolean}true"/>
<options
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/autocomplete/list"/>
</cItem>
<dItem
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/autocomplete"
fieldDescription="Field Description"
fieldLabel="Field Label"
forceSelection="{Boolean}true"
name="./dItem"
required="false">
<datasource
jcr:primaryType="nt:unstructured"
sling:resourceType="/bin/appname/servletname"
addNone="{Boolean}true"/>
<options
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/autocomplete/list"/>
</dItem>
<eItem
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/switch"
defaultChecked="N"
disabled="{Boolean}false"
fieldDescription="Field Description"
fieldLabel="Field Label"
name="./eItem"
uncheckedValue="N"
value="Y"/>
<fItem
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/switch"
defaultChecked="N"
disabled="{Boolean}false"
fieldDescription="Field Description"
fieldLabel="Field Label"
name="./fItem"
uncheckedValue="N"
value="Y"/>
</items>
</field>
</multifield>
</items>
</titles>
</items>
</cInfo>
</items>
</tabs>
</items>
</column>
</items>
</columns>
</items>
</content>
</cq:dialog>
<dialog/>
</jcr:content>
</jcr:root>
Views
Replies
Total Likes
Hi,
The dialog structure is looks ok. It could be a bug.
Can you please try with minimum fields with multifield, just to check if it is a bug or something wrong with dialog.
Views
Replies
Total Likes
Views
Likes
Replies