Extending Digital Assets with custom fields and functionality | Adobe Higher Education
Skip to main content
October 16, 2015
Risolto

Extending Digital Assets with custom fields and functionality

  • October 16, 2015
  • 1 risposta
  • 575 visualizzazioni

I have a requirement to extend fields on images, and to add some custom logic, so I have created a structure shown in the image here:

[img]assetEditor.png[/img]

This works for adding extra fields, but I also need a custom logic that will look for if the main image is selected on the current image, and check current folder, and remove main image check from image that has that selected.

Is this possible to implement and how? I have tried adding listeners to asseteditor widget but statesave or beforestatesave do not work at all, meaning that it does not activate while clicking on save.

Here is the example of the asseteditor widget and the listener i have tried:

<?xml version="1.0" encoding="UTF-8"?> <jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" jcr:primaryType="cq:Widget" jcr:title="Image Asset Editor" sling:resourceType="cq/ui/components/widget" scene7="{Boolean}true" scene7Type="image" xtype="asseteditor"> <listeners jcr:primaryType="nt:unstructured" beforestatesave="function(field){ console.log('activate form save'); }"/> </jcr:root>
Questo argomento è stato chiuso alle risposte.

1 risposta