Esta conversación ha sido bloqueada debido a la inactividad. Cree una nueva publicación.
Nivel 1
Nivel 2
Iniciar sesión en la comunidad
Iniciar sesión para ver todas las insignias
Esta conversación ha sido bloqueada debido a la inactividad. Cree una nueva publicación.
I want to set a default value for my cq:tag which is using a tagpicker (cq/gui/components/common/tagspicker). Is there anyone know how to configure it? I am using AEM 6.3 touch UI.
¡Resuelto! Ir a solución.
Vistas
Respuestas
Total de me gusta
I made it by adding listeners.js in clientlins folder to the component. The following is example:
$document.on("dialog-ready", function() {
// add logic here
});
Vistas
Respuestas
Total de me gusta
I am not aware of how to set a default - when you click on this field - it opens the JCR dialog where an author selects tags,
A community article that uses tag picker -- Adobe Experience Manager Help | Developing HTML Template Language Components that search for Adobe E...
Vistas
Respuestas
Total de me gusta
I would recommend you to have a look at this documentation: Overview of the Tagging API
The implementation of the tagging framework in AEM allows management of tags and tag content using the JCR API . The TagManager ensures that tags entered as values on the cq:tags string array property are not duplicated, it removes TagIDs pointing to non-existing tags and updates TagIDs for moved or merged tags. TagManager uses a JCR observation listener that reverts any incorrect changes. The main classes are in the com.day.cq.tagging package:
Vistas
Respuestas
Total de me gusta
Thanks for your response. I want to set a default value on my "cq:tags" field of my component via dialog configurations. Is it possible? I am trying to set a "value" or "defaultValue". Unfortunately, both of them don't work.
Vistas
Respuestas
Total de me gusta
Thanks for your response and sharing. Really appreciate!!
Vistas
Respuestas
Total de me gusta
Set the default value and
Add a listeners node to your xtype tags and add the loadcontent function to your listener
Working example : function(field){var x=[field.defaultValue];field.setValue(x);}
Further u can tweak the loadcontent function to retrieve the new selected values
Vistas
Respuestas
Total de me gusta
Keep in mind xtype is for Classic UI.
Vistas
Respuestas
Total de me gusta
A small tweak to the Listener, just to avoid showing the defaultValue even after modifying the Tag Field values.
'tagname' is name of the tag.
function(field, record)
{
if(record.get('tagname') == undefined)
{
var x=[field.defaultValue];
field.setValue(x);
}
}
Vistas
Respuestas
Total de me gusta
I made it by adding listeners.js in clientlins folder to the component. The following is example:
$document.on("dialog-ready", function() {
// add logic here
});
Vistas
Respuestas
Total de me gusta
Vistas
me gusta
Respuestas
Vistas
me gusta
Respuestas
Vistas
me gusta
Respuestas