Skip to main content
Nilesh_Mali
Level 3
ago 29, 2023 7:56 a. m. UTC
Resuelto

Call a servlet upon checking a checkbox through page properties.

I have added a custom checkbox to the page properties and am attempting to invoke a servlet when the author checks this checkbox.

ICurrently searching for the precise code or file that needs to be overridden within the 'apps' directory in order to call the servlet.

Este tema ha sido cerrado para respuestas.
SivakumarKanoori
Community Advisor
ago 29, 2023 10:19 a. m. UTC

@nilesh_mali 

You can give a unique class name at checkbox field as below. and write jQuery event .

 

 

 

and then in the JS file add a function, to handle the select option on this field

$(document).on("selected", ".cq-dialog-layout", function() {

// ajax call to make servlet

}

 

Thanks ,

Siva

Thanks,Siva

2 respuestas

varun249715
Adobe Employee
Adobe Employee
ago 29, 2023 9:04 a. m. UTC

Hi @nilesh_mali 

Instead of overriding in apps file. You can create a clientlibrary which will call a servlet on the checkbox event. Since you have created a custom property you can have a custom class or id name for checkbox.

Traducir
SivakumarKanoori
Community Advisor
Community Advisor
ago 29, 2023 10:19 a. m. UTC

@nilesh_mali 

You can give a unique class name at checkbox field as below. and write jQuery event .

 

 

 

and then in the JS file add a function, to handle the select option on this field

$(document).on("selected", ".cq-dialog-layout", function() {

// ajax call to make servlet

}

 

Thanks ,

Siva

Traducir
Thanks,Siva