April 27, 2020
Estimated Post Reading Time ~

How to populate the current page path to the dialog through EXT JS

Add the listener for the widget and use the below script.

function(widget) {
var currentPath;
if(CQ.wcm.SiteAdmin.hasListSelection()) {
var grid = CQ.wcm.SiteAdmin.getActiveGrid();
var selections = grid.getSelectionModel().getSelections();
currentPath = selections[0].id;
console.log(currentPath);
widget.setValue(currentPath)
}
}





By aem4beginner

No comments:

Post a Comment

If you have any doubts or questions, please let us know.