Highlighted

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

Avatar

Avatar

Gunalan_V

Avatar

Gunalan_V

Gunalan_V

25-03-2018

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

Replies

Highlighted

Avatar

Avatar

edubey

Total Posts

1.5K

Likes

264

Correct Answer

392

Avatar

edubey

Total Posts

1.5K

Likes

264

Correct Answer

392
edubey

26-03-2018

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

Highlighted

Avatar

Avatar

Gunalan_V

Avatar

Gunalan_V

Gunalan_V

26-03-2018

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

Highlighted

Avatar

Avatar

Vijayalakshmi_S

MVP

Avatar

Vijayalakshmi_S

MVP

Vijayalakshmi_S
MVP

26-03-2018

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)
Highlighted

Avatar

Avatar

Gunalan_V

Avatar

Gunalan_V

Gunalan_V

27-03-2018

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.

Highlighted

Avatar

Avatar

Vijayalakshmi_S

MVP

Avatar

Vijayalakshmi_S

MVP

Vijayalakshmi_S
MVP

27-03-2018

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

Avatar

Gunalan_V

Avatar

Gunalan_V

Gunalan_V

27-03-2018

Thanks @Vijis31358935

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

Highlighted

Avatar

Avatar

Vijayalakshmi_S

MVP

Avatar

Vijayalakshmi_S

MVP

Vijayalakshmi_S
MVP

27-03-2018

Thanks for the confirmation.

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

Highlighted

Avatar

Avatar

sreen80631214

Avatar

sreen80631214

sreen80631214

03-05-2018

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

Highlighted

Avatar

Avatar

Vijayalakshmi_S

MVP

Avatar

Vijayalakshmi_S

MVP

Vijayalakshmi_S
MVP

04-05-2018

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