We can set rootPath value to any location but the drawback is that it is static.So, I need to dynamically generate the value of rootPath. I found one article CQ Dialog - Generate dynamic rootPath with ExtJS Plugin | 6D Labs but this article is for Classic Ui.