Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

How to use the AEM Asset Selector in a dialog?

Avatar

Level 2

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.

1 Accepted Solution

Avatar

Correct answer by
Level 7

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

View solution in original post

11 Replies

Avatar

Level 10

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.

Avatar

Level 2
smacdonald2008

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

Regards,

Kalyan

Avatar

Employee

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

Avatar

Community Advisor

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

Avatar

Level 2

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 ?

Avatar

Community Advisor

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.

Avatar

Level 3

Hi @Arun_Patidar 

 

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

 

Regards,

Alexander

Avatar

Community Advisor

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

Avatar

Correct answer by
Level 7

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

Avatar

Level 4

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