Tags inside multifields | Community
Skip to main content
Level 2
Nov 15, 2017 10:03 AM UTC
Solved

Tags inside multifields

Hello,

I created in dialog a new multifields with text and tags field into the form.

I tried to select and save more than one tag inside the multifileds without succeed.

I notice that if I put the tag outside the multifields, everything works fine.

Below my code:

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

<geolocalizedText

  jcr:primaryType="nt:unstructured"

sling:resourceType="silversea/silversea-com/ui/components/foundation/form/multifields"

fieldLabel="Geolocalized Text">

<field

jcr:primaryType="nt:unstructured"

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

class="multifields-wrapper"

name="./geolocalized"

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

<text

jcr:primaryType="nt:unstructured"

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

fieldLabel="Text"

name="text" />

<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="tags"  />

</items>

</field>

</geolocalizedText>

The green one works with this output in crxde

cq:tags            String[]                 geotagging:eu, geotagging:as, geotagging:uk

The yellow one doesn’t work, it saves only the last selected tag:

geolocalized     String                {"text":"lblj","tags":"geotagging:uk","tags@TypeHint":"String[]","tags@Delete":""}

How can I possible to achieve my goal ?

Is there any workaround ?

Thanks

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
manoj_devapath
manoj_devapathAccepted solution
Level 5
Nov 15, 2017 3:30 PM UTC

Yes the link I mentioned in previous comment is developed on AEM 6.2

4 replies

Level 2
Nov 15, 2017 4:45 PM UTC

Perfect.

Thank you so much

Translate
manoj_devapath
manoj_devapathAccepted solution
Level 5
Nov 15, 2017 3:30 PM UTC

Yes the link I mentioned in previous comment is developed on AEM 6.2

Translate
Level 2
Nov 15, 2017 3:20 PM UTC

Thank you @mjb54261515@.

Does this solution work with AEM 6.2 with granite UI ?

Translate
manoj_devapath
Level 5
Nov 15, 2017 2:01 PM UTC

OOTB multifield will not be able to slove this problem. we need an custom js file to solve this issue. This js has to handle both saving node to jcr and render it on dialog.

here is good example of doing similar approch on tags.

Experiencing Adobe Experience Manager - Day CQ: AEM 62 - Touch UI Nested ( Multi-Multi ) Composite Multifield storing da…

ref:

cq5 - AEM - xtype 'tags' within Multifield - Stack Overflow

Translate