Hi,
I am working on migration of coralui of Relatedproduct component, which is multifield component. After migration contents are not getting saved into dialog, please refer my below xml code and help me.
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:granite="http://www.adobe.com/jcr/granite/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="nt:unstructured"
jcr:title="Related products configuration"
sling:resourceType="cq/gui/components/authoring/dialog"
helpPath="/content/diagnostics/authoring-help.relatedproducts.html?wcmmode=disabled">
<content
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">
<realtedProductsTab
jcr:primaryType="nt:unstructured"
jcr:title="Related products configuration"
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">
<sectionHeading
cq:showOnCreate="{Boolean}true"
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
allowCreate="{Boolean}true"
fieldLabel="Section Heading"
name="./sectionHeading">
<granite:data
jcr:primaryType="nt:unstructured"
cq-msm-lockable="sectionHeading"/>
</sectionHeading>
<products
jcr:primaryType="nt:unstructured"
jcr:title="Related products"
sling:resourceType="granite/ui/components/coral/foundation/form/fieldset"
showhidetargetvalue="static">
<items jcr:primaryType="nt:unstructured">
<column
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/container">
<items jcr:primaryType="nt:unstructured">
<relatedProducts
granite:class="full-width"
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/multifield"
composite="{Boolean}true"
fieldDescription="Click '+' to add a new product"
fieldLabel="Related Products">
<field
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/fieldset"
name="./relatedProducts">
<items jcr:primaryType="nt:unstructured">
<column
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/container">
<items jcr:primaryType="nt:unstructured">
<path
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/pathfield"
fieldDescription="Select path"
fieldLabel="Product path"
name="./pagePath"
rootPath="/content"/>
</items>
</column>
</items>
</field>
</relatedProducts>
</items>
</column>
</items>
</products>
</items>
</column>
</items>
</realtedProductsTab>
<realtedProductsFilterTab
jcr:primaryType="nt:unstructured"
jcr:title="Filter configuration"
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">
<filter
jcr:primaryType="nt:unstructured"
jcr:title="Filter"
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">
<fieldset
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/fieldset">
<items jcr:primaryType="nt:unstructured">
<column
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/container">
<items jcr:primaryType="nt:unstructured">
<viewPublished
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/checkbox"
fieldDescription="Check if you want to displayed published pages only in result"
name="./viewPublished"
text="View Published Only"
value="true"/>
<generateQuery
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/button"
icon="icon-info-sign"
name="./generateQuery"
rel="tagFilterQuery"
text="Generate Query"/>
<queryField
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/textarea"
class="queryTextArea"
disabled="{Boolean}true"
fieldLabel="Generated Query"
name="./queryField"
rows="3"/>
<multifield
granite:class="full-width filterQuery"
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/multifield"
composite="{Boolean}true"
fieldDescription="Click 'Add fields' to add a new configuration"
fieldLabel="Tag Filters">
<field
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/fieldset"
name="./filters">
<items jcr:primaryType="nt:unstructured">
<column
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/container">
<items jcr:primaryType="nt:unstructured">
<tags
jcr:primaryType="nt:unstructured"
sling:resourceType="cq/gui/components/common/tagspicker"
allowBulkEdit="{Boolean}true"
allowCreate="{Boolean}true"
fieldDescription="Please configure tags for search"
fieldLabel="Tags to search"
name="./searchTags"
renderReadOnly="{Boolean}false"
tagsPath="/content/cq:tags">
<granite:data
jcr:primaryType="nt:unstructured"
cq-msm-lockable="searchTags"/>
</tags>
<andop
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/checkbox"
fieldDescription="Please check to use 'AND' operation"
name="./isopand"
text="Use And Op"
value="true"/>
<predicateop
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/select"
fieldLabel="Group operation"
name="./predicateop">
<items jcr:primaryType="nt:unstructured">
<None
jcr:primaryType="nt:unstructured"
text="Please select"
value="none"/>
<orop
jcr:primaryType="nt:unstructured"
text="Or Operation"
value="or"/>
<andop
jcr:primaryType="nt:unstructured"
text="And Operation"
value="and"/>
</items>
</predicateop>
</items>
</column>
</items>
</field>
</multifield>
</items>
</column>
</items>
</fieldset>
</items>
</column>
</items>
</filter>
</items>
</column>
</items>
</realtedProductsFilterTab>
</items>
</tabs>
</items>
</content>
</jcr:root>
Note: there is two multifield tab "Related Products" & "Tag Filters" only for tag filters multifield content is not getting saved
Please help me out ASAP
Views
Replies
Total Likes
Hi @rajnishkr93 ,
Are you getting any browser console/network tab error while dialog submission?
Please check below threads-
https://stackoverflow.com/questions/54593689/multifield-component-in-aem-values-are-not-saved
Hi @Ritesh_Mittal i am not getting any error into browser while i am already using composite{Boolean}=true property but issue is not getting resolved
@rajnishkr93 Below multi field code is working on AEM 6.4. You can check and compare with your code. Hope this will help you. Thank You.
<?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="nt:unstructured"
jcr:title="Image List"
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">
<tabs
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/tabs">
<items jcr:primaryType="nt:unstructured">
<imageList
jcr:primaryType="nt:unstructured"
jcr:title="Image List"
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">
<images
jcr:primaryType="nt:unstructured"
jcr:title="Images"
sling:resourceType="granite/ui/components/coral/foundation/form/fieldset">
<items jcr:primaryType="nt:unstructured">
<images
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/multifield"
composite="{Boolean}true"
fieldDescription="Click on Add button to add a new image"
fieldLabel="Images">
<field
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/container"
name="./imagesList">
<items jcr:primaryType="nt:unstructured">
<column
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/container">
<items jcr:primaryType="nt:unstructured">
<title jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
fieldDescription="Title"
name="./title"
fieldLabel="Title"
text="Title" />
<image
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/pathbrowser"
fieldDescription="Image"
name="./image"
fieldLabel="Image"
text="Image"
rootPath="/content"/>
<imageAlt
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
fieldDescription="Image Alt"
name="./imageAlt"
fieldLabel="Image Alt"
text="Image Alt" />
</items>
</column>
</items>
</field>
</images>
</items>
</images>
</items>
</column>
</items>
</imageList>
</items>
</tabs>
</items>
</content>
</jcr:root>
Hi @kchaurasiya even my code is working for one multifiled tab "Related Products" but for second tab "Tag Filters" tab multifield content is not getting save. if i explain you in details then please find below code which is not working
i.e. second part of previous xml code:-
<realtedProductsFilterTab
jcr:primaryType="nt:unstructured"
jcr:title="Filter configuration"
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">
<filter
jcr:primaryType="nt:unstructured"
jcr:title="Filter"
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">
<fieldset
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/fieldset">
<items jcr:primaryType="nt:unstructured">
<column
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/container">
<items jcr:primaryType="nt:unstructured">
<viewPublished
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/checkbox"
fieldDescription="Check if you want to displayed published pages only in result"
name="./viewPublished"
text="View Published Only"
value="true"/>
<generateQuery
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/button"
icon="icon-info-sign"
name="./generateQuery"
rel="tagFilterQuery"
text="Generate Query"/>
<queryField
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/textarea"
class="queryTextArea"
disabled="{Boolean}true"
fieldLabel="Generated Query"
name="./queryField"
rows="3"/>
<multifield
granite:class="full-width filterQuery"
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/multifield"
composite="{Boolean}true"
fieldDescription="Click 'Add fields' to add a new configuration"
fieldLabel="Tag Filters">
<field
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/fieldset"
name="./filters">
<items jcr:primaryType="nt:unstructured">
<column
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/container">
<items jcr:primaryType="nt:unstructured">
<tags
jcr:primaryType="nt:unstructured"
sling:resourceType="cq/gui/components/common/tagspicker"
allowBulkEdit="{Boolean}true"
allowCreate="{Boolean}true"
fieldDescription="Please configure tags for search"
fieldLabel="Tags to search"
name="./searchTags"
renderReadOnly="{Boolean}false"
tagsPath="/content/cq:tags">
<granite:data
jcr:primaryType="nt:unstructured"
cq-msm-lockable="searchTags"/>
</tags>
<andop
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/checkbox"
fieldDescription="Please check to use 'AND' operation"
name="./isopand"
text="Use And Op"
value="true"/>
<predicateop
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/select"
fieldLabel="Group operation"
name="./predicateop">
<items jcr:primaryType="nt:unstructured">
<None
jcr:primaryType="nt:unstructured"
text="Please select"
value="none"/>
<orop
jcr:primaryType="nt:unstructured"
text="Or Operation"
value="or"/>
<andop
jcr:primaryType="nt:unstructured"
text="And Operation"
value="and"/>
</items>
</predicateop>
</items>
</column>
</items>
</field>
</multifield>
</items>
</column>
</items>
</fieldset>
</items>
</column>
</items>
</filter>
</items>
</column>
</items>
</realtedProductsFilterTab>
Hi @rajnishkr93
In your case issue is with Tagpicker. Composite : true not working with tagpicker however it is working perfectly fine with cq/gui/components/coral/common/form/tagfield.
I remember tagpicker was deprecated in 6.3 but now I am not able to find any documentation for 6.5.
@kautuk_sahni Can you please confirm if this is still in deprecated list. Not able to find this.
Will update if I find anything,
Meanwhile you can create daycare for tagpicker.
Thanks
Dipti
Hi @Dipti_Chauhan
no that is not correct format, generally tags should be saved into name format only not in url format
@rajnishkr93 I took your dialog code and tried on my local AEM 6.4 instance. I faced the same issue that you faced.I just copied your first tab as a reference and paste it in to the second tab then changed the corresponding field and i realised the issue with tagfield only. You can use the tagfield from the coral form instead of using tagpicker as Dipti Said.
Once you will do this. It will work perfectly. Thanks
Below is the second tab dialog code for your reference.
<relatedProducts11
granite:class="full-width"
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/multifield"
composite="{Boolean}true"
fieldDescription="Click 'Add fields' to add a new configuration"
fieldLabel="Tag Filters">
<field
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/fieldset"
name="./filters">
<items jcr:primaryType="nt:unstructured">
<tags
jcr:primaryType="nt:unstructured"
sling:resourceType="cq/gui/components/coral/common/form/tagfield"
allowBulkEdit="{Boolean}true"
allowCreate="{Boolean}true"
fieldDescription="Please configure tags for search"
fieldLabel="Tags to search"
name="./searchTags"
renderReadOnly="{Boolean}false"
tagsPath="/content/cq:tags">
<granite:data
jcr:primaryType="nt:unstructured"
cq-msm-lockable="searchTags"/>
</tags>
<andop
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/checkbox"
fieldDescription="Please check to use 'AND' operation"
name="./isopand"
text="Use And Op"
value="true"/>
<predicateop
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/select"
fieldLabel="Group operation"
name="./predicateop">
<items jcr:primaryType="nt:unstructured">
<None
jcr:primaryType="nt:unstructured"
text="Please select"
value="none"/>
<orop
jcr:primaryType="nt:unstructured"
text="Or Operation"
value="or"/>
<andop
jcr:primaryType="nt:unstructured"
text="And Operation"
value="and"/>
</items>
</predicateop>
</items>
</field>
</relatedProducts11>
Hi @kchaurasiya ,
tags should be saved into name format only and the coral tags resourceType which you are refereeing its savings tags into url form and also its deprecated into coralui 3
Views
Likes
Replies
Views
Likes
Replies