Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

Pre-Populate Textfield value with MetaData from from Droptarget's path to Asset

Avatar

Level 2

I am using a dropTarget for a video component. After the author drags the video to the target I would like to pre-populate the title node in the dialog from the dc:title value of the asset.  What is the best way to approach this? Seems like the OOTB droptarget only support pathfield to be pre-populated into the dialog.

Thank you in advance for advice or pointers to samples.

AEM 5.5 Service Pack 3

3 Replies

Avatar

Level 10

Try overlaying /libs/foundation/components/video and implement your logic accordingly.

Avatar

Level 2

Hi Sham, thank you for the reply but that still leaves holes, the /libs/foundation/components/video does not have dropTarget and even still I need a way to pull meta data from the dropped asset in addition to the path field into the dialog.

I am thinking it should be a listener on the textfield for the video title that when blank, it xHR's the dc:title from the asset as the textfield value.

Unrelated question: Is there a sling url to the dam asset that produces JSON output?

Avatar

Level 10

TheRealUpWorks wrote...

Unrelated question: Is there a sling url to the dam asset that produces JSON output?

Yes appened json and optional selecter. Example

http://localhost:4502/content/dam/geometrixx/portraits/scott_reynolds.jpg.json
http://localhost:4502/content/dam/geometrixx/portraits/scott_reynolds.jpg.-1.json