Select multiple tags in touch UI AEM 6.2 | Community
Skip to main content
Level 2
Nov 8, 2017 12:48 PM UTC

Select multiple tags in touch UI AEM 6.2

Hi Team,

1. How can I store multiple tags in a component's node. I can select multiple tags in dialog but its not saving in JCR node, taking the first selection only.

Below is the screenshot showing all the properties I have used :

2. My tags data is not pertaining while reediting the component, I don't see the tags selected when I am reopening the dialog but it is stored in component node of jcr, Please help me to resolve this too.

Thanks in advance for your help.

Regards,
SD

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

15 replies

swatidAuthor
Level 2
Nov 15, 2017 6:16 AM UTC

Hi Team,

I am not able to attach package here on forum,

Please tell me how to share the package with you?

Thanks,

SD

Translate
kautuk_sahni
Employee
Nov 15, 2017 6:19 AM UTC

Use Google Drive/Dropbox and shear the link here.

Translate
Kautuk Sahni
Level 5
May 20, 2020 4:47 PM UTC

@kautuk_sahni - I am facing the same issue in AEM 6.2. Can you tell me what was the fix for this issue? I am using tagspicker inside multifield

Translate
manoj_devapath
Level 5
Nov 14, 2017 2:20 PM UTC

pls do package it and share google drive link. I will also look into this.

Translate
swatidAuthor
Level 2
Nov 13, 2017 8:15 AM UTC

Hi All,

Thanks all for your responses.

I tried to use tags under multifield, it's creating tags as a string not string[].

I am not able to attach the package so sending you screenshots only:

<questions

                        jcr:primaryType="nt:unstructured"

                        sling:resourceType="granite/ui/components/foundation/form/multifield"

                        class="full-width"

                        eaem-nested="">

                        <field

                            jcr:primaryType="nt:unstructured"

                            sling:resourceType="granite/ui/components/foundation/form/fieldset"

                            name="./questions">

                            <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">

                                        <question

                                            jcr:primaryType="nt:unstructured"

                                            sling:resourceType="cq/gui/components/authoring/dialog/richtext"

                                            fieldLabel="Question :"

                                            name="./question">

                                            <rtePlugins jcr:primaryType="nt:unstructured">

                                                <paraformat

                                                    jcr:primaryType="nt:unstructured"

                                                    features="*"/>

                                                <spellcheck

                                                    jcr:primaryType="nt:unstructured"

                                                    features="*"/>

                                                <format

                                                    jcr:primaryType="nt:unstructured"

                                                    features="*"/>

                                                <edit

                                                    jcr:primaryType="nt:unstructured"

                                                    features="*"/>

                                                <findreplace

                                                    jcr:primaryType="nt:unstructured"

                                                    features="*"/>

                                            </rtePlugins>

                                        </question>

                                        <tags

                                            cq:showOnCreate="{Boolean}true"

                                            jcr:primaryType="nt:unstructured"

                                            sling:resourceType="cq/gui/components/common/tagspicker"

                                            allowBulkEdit="{Boolean}true"

                                            allowCreate="{Boolean}true"

                                            cq-msm-lockable="cq:tags"

                                            fieldLabel="Tags"

                                            name="./cq:tags"

                                            value="String[]"/>

                                    </items>

                                </column>

                            </items>

                        </field>

                    </questions>

Thanks,

SD

Translate
swatidAuthor
Level 2
Nov 14, 2017 8:54 AM UTC

Hi Team,

Can you please retest with selecting multiple tags inside multifield as shown above.

Thanks in advance for your help.

Regards,

SD

Translate
Level 2
Nov 14, 2017 10:34 AM UTC

If you select only one tag, it will be stored as a String. Once stored as String it will continue to be String (comma separated) even if you try editing the field and adding multiple tags.

Try saving multiple values in the first attempt itself (i.e. before the property exists in AEM).

Translate
kautuk_sahni
Employee
Nov 10, 2017 6:17 AM UTC

Can you reproduce this on the fresh instance? Also, check the error.logs if the problem still persists.

Translate
Kautuk Sahni
manoj_devapath
Level 5
Nov 8, 2017 3:25 PM UTC

This is not an issue with OOOB tag widget AEM provides. I just tested in AEM 6.2. It works fine.

I have attached screen shots too.

following are sample tag widget snippets that might help.

<tags

                                                cq:showOnCreate="{Boolean}true"

                                                jcr:primaryType="nt:unstructured"

                                                sling:resourceType="cq/gui/components/common/tagspicker"

                                                allowBulkEdit="{Boolean}true"

                                                allowCreate="{Boolean}true"

                                                cq-msm-lockable="cq:tags"

                                                fieldLabel="Tags"

                                                name="./cq:tags"

                                                renderReadOnly="{Boolean}true"/>

<tags

                    jcr:primaryType="cq:Widget"

                    cls="cq-propsdialog-tags"

                    fieldLabel="Tags/Keywords"

                    name="./cq:tags"

                    xtype="tags"/>

Translate
swatidAuthor
Level 2
Nov 9, 2017 5:48 AM UTC

Hi there,

I tried the cq:dialog tags field of page component but still not accepting multiple tags. Its storing the tags as String not as String[] in jcr with single value.

I also used the extra clientlibs of page component but still not working.

Appreciate your more suggestions.

Thanks,

SD

Translate
manoj_devapath
Level 5
Nov 9, 2017 3:47 PM UTC

Never came across this. I tested this again in AEM 6.2 touch ui working fine for me.

smacdonald2008​ any thoughts ?

Translate