0 Replies Latest reply on Jun 13, 2012 7:43 AM by durganuvvula

    How to overlay the Dialog.js(libs/cq/ui/widgets/source/widgets/Dialog.js)

    durganuvvula Level 1

      Hello Team,


      My scenario is to store the vanity url in lower case. once user entered /content/mycompany/us/en/MCDonalds I would store it as /content/mycompany/us/en/mcdonalds, Next time on request of /content/mycompany/us/en/Mcdonalds, I would convert the incoming vanity to lower case and check with the entries in the cq5 and then accordingly either throw the message in the vtypes that vanity url already exist or allow the vanity url to go thru. I have acheived that with the following pseduo code Approach1. But I am not sure how to overlay the  Dialog.js(libs/cq/ui/widgets/source/widgets/Dialog.js).



      Changing the code in the Dialog.js(libs/cq/ui/widgets/source/widgets/Dialog.js)


           * Submits the dialog.

           * @param {CQ.Ext.Button} button The button that has been hit

           * @param {Function} success The function to call if the dialog submission was successful.

           *                           Overwrites {@link #success}.

           * @param {Function} failure The function to call if the dialog submission has failed.

           *                           Overwrites {@link #failure}.


          ok: function(button, success, failure) {

      if (this.form.isValid()) {

      //get the form values

      //convert the sling:vanityPath to lowercase

      //set the form values




      Now My question is how to overlay the (libs/cq/ui/widgets/source/widgets/Dialog.js). I tried putting the Dialog.js stored as MyDialog.js in my page component clientlib and changed the registration of the dialog to CQ.Ext.reg("customDialog", CQ.Dialog1) and given the xtype of the above dialog as customDialog. (Here already I overlayed the dialog containing all the tabs i,e basic,advanced. livecopy etc and tab_basic panel of the vanity url code from libs to do the validation with vtypes).

      The problem is I am able to see the empty dialog but not the tabs displayed, when I use the xtype as customDialog.

      Any suggestions/pointers to solve this problem would be appreciable.

      Best Regards,