Expand my Community achievements bar.

Applications for the 2024-2025 Adobe Experience Manager Champion Program are open!

Tagfield Component Mandatory Property is not working as expected in AEM 6.3

Avatar

Level 3

Hello,

We have done Asset metadata customization in our application.

While upgrading from AEM 6.2 to AEM 6.3 and as part of that we are supposed to update tagspicker component as tagfield component.

Now we are not able to make it as mandatory even though we set required property as "true".

Which means it shows as "*" in the field when we set required as true in touch UI however its not validating when we click on save and close or save button.

Could someone let me know if this is know issue ?

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

     <tagcategory

                                jcr:primaryType="nt:unstructured"

                                sling:resourceType="/libs/cq/gui/components/coral/common/form/tagfield"

                                fieldLabel="Category"

                                required="{Boolean}true"

                                multiple="{Boolean}true"

                                rootPath="<category-path>/category"

                                name="./jcr:content/metadata/dps:category">

                                <datasource

                                    jcr:primaryType="nt:unstructured"

                                    sling:resourceType="<data-source-path>/all-datasource/category"/>

                                <values

                                    jcr:primaryType="nt:unstructured"

                                    sling:resourceType="granite/ui/components/foundation/form/autocomplete/tags"/>

                                <options

                                    jcr:primaryType="nt:unstructured"

                                    sling:resourceType="granite/ui/components/foundation/form/autocomplete/list"/>

     </tagcategory>

<items>

Thanks,

GVK

9 Replies

Avatar

Level 10

It seems the issue with new coral resourceType,
for now you can use /libs/cq/gui/components/common/tagspicker which works

Avatar

Level 3

Thanks for the response.

In AEM 6.2 we were using tagspicker after migrating to AEM 6.3 tagspicker was not working as expected and we are not able to submit. So when I check the deprecated components it mentioned that tagspicker was deprecated and need to use the tagfield component.

https://helpx.adobe.com/experience-manager/6-3/release-notes/deprecated-removed-features.html

https://helpx.adobe.com/experience-manager/6-3/release-notes/deprecated-removed-features.html

Avatar

Community Advisor

Hi,

Can you try the below:

  • Check for any console errors on click of dialog submit (without entering tags).
  • Try using "/libs/cq/gui/components/coral/common/form/tagfield" for a field without datasource/autocomplete components.  -(this have tried in local and it works with respect to "required" validation)

Avatar

Level 3

Let me check that option but we would need both autocomplete tags and list. Not sure if any fix has been made as part of AEM 6.3 SP1 or so.

Avatar

Community Advisor

Hi,

Yes try that without datasource/autocomplete and then try using Coral UI 3 based for autocomplete resources as well

(granite/ui/components/coral/foundation/form/autocomplete/tags and granite/ui/components/coral/foundation/form/autocomplete/list)

Avatar

Level 3

Thanks @Vijis31358935

I have tried updating other tagspicker components to tagfield where we are not using datasource and autocomplete and It's working fine.

Avatar

Community Advisor

Thanks for the confirmation.

Can you also try for autocomplete components and let know the outcome.

Avatar

Level 1

Hi want to report another issue with /libs/cq/gui/components/coral/common/form/tagfield

i am not able to set an id or class for the tagfield component.

the option is there for /libs/cq/gui/components/common/tagspicker component.

Please suggest if there is any option

Avatar

Community Advisor

HI,

For Coral UI 3 types in general,

  • We need to define the HTML global attributes using the property granite:class, granite:id
  • For data attributes, granite:data node is to be created under the field(in this case, under tagsfield node) and properties added to this node will be available as data-* attributes in the generated HTML markup.

Helpx link for reference: Common Attributes — Granite UI 1.0 documentation