Expand my Community achievements bar.

Pathfield search not working properly on AEM 6.3

Avatar

Level 2

Hi community,

I'm currently working on a site implementation with AEM 6.3. We have a dialog that is using granite/ui/components/coral/foundation/form/pathfield, this is how the code looks like:

<multifieldcollection

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

fieldDescription="Click + to add a new page/asset"

fieldLabel="Add new Page/Asset for static entries"

jcr:primaryType="nt:unstructured"

composite="{Boolean}true">

<field

sling:resourceType="granite/ui/components/coral/foundation/container"

jcr:primaryType="nt:unstructured"

name="./staticPathsConfig">

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

<linkurl

sling:resourceType="granite/ui/components/coral/foundation/form/pathfield"

fieldLabel="Page/Asset Path"

jcr:primaryType="nt:unstructured"

                                             filter="nosystem,hierarchyNotFile"

rootPath="/content"

name="./path" />

</items>

</field>

</multifieldcollection>

When the user tries to use the search for the pathfield, seems like on the results is showing jcr and metadata nodes which is not correct for an author user. We are expecting to see only pages and assets as a results of the search:

Screenshot 2017-11-02 12.57.44.png

Are we missing something here or this is how the widget is supposed to work? If that the case how can we configured it to only display assets and pages?

Thanks,

David.

23 Replies

Avatar

Community Advisor

Sorry for confusion, I was using asset picker API, which only return dam:Asset type

How to use the AEM Asset Selector in a dialog?

Asset Selector in dialog

pickerSrc

/libs/dam/gui/content/assetselector/jcr:content/body/items/assetselector.html?dialog=true

Yes but with Granite Pathfield problem still persists.



Arun Patidar

Avatar

Level 2

Arun Patidar​ yeah I've tried that approach too , the dialog open, and is filtering out the unwanted items , but once an item is selected is not possible to submit the selection...

<assets granite:class="foundation-layout-util-maximized-alt coral-Form-fieldwrapper" jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/container">

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

        <multi granite:class="" jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/form/multifield">

            <field jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/form/pathfield" pickerSrc="/libs/dam/gui/content/assetselector/jcr:content/body/items/assetselector.html?dialog=true&amp;root=/content/dam" rootPath="/content/dam" name="./fixedassets" />

        </multi>

    </items>

</assets>

3.png

1.png

2019-08-30_1313.png