How to use the AEM Asset Selector in a dialog? | Community
Skip to main content
Level 2
July 25, 2018
Solved

How to use the AEM Asset Selector in a dialog?

  • July 25, 2018
  • 9 replies
  • 16330 views

As per document Asset Selector ,   http://localhost:4502/aem/assetpicker.html?dialog=true  Use these parameters to open the asset selector as Granite Dialog. This option is only applicable when you launch the asset selector through Granite Path Field, and configure it as pickerSrc URL.

I tried the following code in the dialog XML:

<image
  
jcr:primaryType="nt:unstructured"
  
sling:resourceType="granite/ui/components/coral/foundation/form/pathfield"
  
name="./videoThumbnail"
  
pickerSrc="/aem/assetpicker.html?dialog=true"

   mimeType="image"
  
rootPath="/content/dam"/>

The pathfield above does not seems to use the alternative picker specified by the pickerSrcand behaves like a standard pathfield.

Also tried adding the extra URL parameters as specified in the pathfield docs but that made no change.

Please provide ur inputs how to configure assetpicker in dialog.

Regards,

Kalyan.

Best answer by antoniom5495929

Hi,

i've created a demo package which works in AEM 6.4.

You can find it here [0].

Let me know if you need more info.

[0] WeTransfer

Thanks,

Antonio

9 replies

smacdonald2008
Level 10
July 25, 2018

WHat are you trying to perform with the PathField - i am looking at http://localhost:4502/aem/assetpicker.html and it looks like its functioning properly.

Level 2
July 26, 2018
smacdonald2008

I want to launch the asset selector through Granite Path Field​ in dialog, for image asset selection.

Regards,

Kalyan

Adobe Employee
October 18, 2018

Did you find a solution for this? Would you mind sharing?

arunpatidar
Community Advisor
Community Advisor
October 18, 2018

It does works if you'll be using below path for pickerSrc

/libs/dam/gui/content/assetselector/jcr:content/body/items/assetselector.html?dialog=true&assettype=images&root=/content/dam/we-retail/en/activities

Thanks

Arun

Arun Patidar
Level 2
September 4, 2019

The pickerSrc is not working with values "

/libs/dam/gui/content/assetselector/jcr:content/body/items/assetselector.html?dialog=true& assettype=images&root=/content/dam/we-retail/en/activities"

or

"/aem/assetpicker.html?dialog=true" anyone got the assetpicker ?

arunpatidar
Community Advisor
Community Advisor
September 7, 2019

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

but still there is a bug, it will not allow selecting assets from assets selector.

you can log a daycare ticket.

Arun Patidar
Level 2
August 19, 2021

Hi @arunpatidar 

 

Do you know if this issue is tracked and/or planned to be fixed?

 

Regards,

Alexander

arunpatidar
Community Advisor
Community Advisor
August 19, 2021

Hi @alexander_prikhodko 
Not sure if user reported the issue or not. I did not reported anything though.

Arun Patidar
antoniom5495929
antoniom5495929Accepted solution
Level 7
September 11, 2019

Hi,

i've created a demo package which works in AEM 6.4.

You can find it here [0].

Let me know if you need more info.

[0] WeTransfer

Thanks,

Antonio

DhirajAg
Level 4
October 14, 2019

Not able to view the attached package for the answer that is marked correct. Can you please post the solution again?

sreedobe
Level 4
August 11, 2020

Did you get solution, I am looking to do same on aem 6.5 page dialog thumbnail.

@kalyanc42390873  @antoniom5495929 @arunpatidar @maruti_prasad 

arunpatidar
Community Advisor
Community Advisor
July 24, 2022
arunpatidar
Community Advisor
Community Advisor
August 3, 2022

Hi @arunpatidar 

Above solution is not working for me.

But it works with below solution : https://stackoverflow.com/questions/51366697/how-to-use-the-aem-asset-selector-in-a-coral3-dialog

 

One issue here is , let's say I have selected one image at path /content/dam/xyz/steps/image1.png

and now if I click on the pathfiled it will again take me to /content/dam/xyz instead of image path .

 

@arunpatidar could you please let us know where can i find the tutorial or any article regarding coral 3 granite framework which are helpfull for dialog customization. How did you learn.

Thanks


Hi,

The fix is done in AEMaaCS. 

You can learn about Granite and Coral from

https://developer.adobe.com/experience-manager/reference-materials/6-5/granite-ui/api/jcr_root/libs/granite/ui/index.html 

https://developer.adobe.com/experience-manager/reference-materials/6-5/coral-ui/coralui3/components.html 

Arun Patidar