Tags inside multifields | Community
Skip to main content
New Participant
November 15, 2017
Solved

Tags inside multifields

  • November 15, 2017
  • 4 replies
  • 4205 views

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.
Best answer by manoj_devapath

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

4 replies

New Participant
November 15, 2017

Perfect.

Thank you so much

manoj_devapath
manoj_devapathAccepted solution
New Participant
November 15, 2017

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

New Participant
November 15, 2017

Thank you @mjb54261515@.

Does this solution work with AEM 6.2 with granite UI ?

manoj_devapath
New Participant
November 15, 2017

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