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

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).
Approach1:
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,
Durga

Thanks Roland,
  To give you more information. We discovered the source of the multiple instantiations of tabs from the page properties. We have a listener on the dialog.xml for our pages that listens for loadcontent events. In the course of its logic, the javascript for this listener will invoke dialog.loadContent(path) itself. Thus the double calls. Strictly speaking, we could look at ways to avoid the use of the loadContent call. But we also feel that there is something going on with regards to siteCatalyst and double-loading. This might be something you'll want to incorporate in your efforts to reproduce this. For posterity, here's a sample listener definition in our dialog.xml
<listeners
        jcr:primaryType="nt:unstructured"
        loadcontent="function(dialog, records, opts, success) {CQ.Acme.populateShortURL(dialog, records, opts, success);}"/>
Hope this helps!

Similar Messages

  • How to stop the Dialog from being dragged

    I was hoping that someone could tell me when calling a Dialog from Jframe, a how to stop the Dialog from being dragged
    while a dialog is showing.
    When it is visible I can still click and drag the Dialog
    I want to set it so you can not drag it until the dialog has be closed.

    If you don't have access to the parent frame, a "hack" that usually works:
    Frame frame = Frame.getFrames()[0];
    if (null != frame && frame instanceof JFrame){
    JFrame jf = (JFrame)frame;
    JDialog jd = new JDialog(jf, "title");
    ... code here ...
    As each JFrame (or Frame) is opened, its stored in the array of Frames that you can get. Same thing with Dialog.getDialogs(). Almost always, at least so far for me I've never had this problem, the [0] index is the main window opened, or the parent/top frame. I'd put the check in there to be safe and make sure its a JFrame and usually you'll only have the one JFrame.

  • How to get the dialog of select ODBC source

    how to get the dialog of select ODBC source which system provide.

    JNI.
    Or buy/find a library that does it for you (using JNI.)

  • How to retain the dialog messages defined in processRequest after rendering

    In my page one piece of code is there as "oapagecontext.forwardImmediatelyToCurrentPage(null,true,null);"
    which is used to render back to the current page,but after rendering the dialog messages which i have defined in processRequest are not coming.
    My issue is how can i retain that dialog message.

    Hi
    You can try and use guard conditions or check the table for data, if there is no data in the table the application will return an error message.
    Jarrod Williams

  • How to launch the dialog with a wizard having train component

    Hi
    I have a page with a button and onclicking the button i need to show a dialog wizard( a wizard with 3 pages with the train component to move back and forth)
    I have created a taskflow as a train with 3 pages, but onclicking the button i am not able to launch the dialog as a taskflow.
    Any documentatino on how to achieve the same or some sample application reference is highly appreciated
    Bittu Bansal

    On clicking the button i want to show a popup and that popup drives me through the wizard.
    However i am able to achive the same right now.
    I am calling a popup using showPopupBehaviour and that popup i have created the region where i have embedded the task flow for a train wizard.
    Thanks
    Bittu Bansal

  • How to avoid the dialog box "SAVE, Open, Cancel" When we take a pdf print.

    I have an item entry form. User select different items and then submit the order by pressing submit button.
    I want that when the user click the submit button he is directet to the print preview page. I have done that and it is running fine but the issue is when user click on the submit button the dialog box appear showing file name and an option to save or open the file. I want to avoid that dialog box and I want that the file is opened directly.
    In shot I want that the user goes directly to the open file option instead of giving him the options.
    Thx,

    Hello Syed,
    I thought this is a browser behavior. In Firefox it asks the first time what I want to do.
    If I select open and select the checkbox to do that always like that, it's opening directly.
    I searched a bit in javascript, use an iframe or specify different targets, the behavior is the same, unless I check the checkbox I get the dialog box. Maybe there's a workaround, but I didn't find that yet.
    Regards,
    Dimitri
    -- http://dgielis.blogspot.com/
    -- http://www.apex-evangelists.com/
    -- http://www.apexblogs.info/

  • How to supress the dialog box in smartforms

    Hi Experts,
    Can any body tell how to supress the dailog box while executing the smarform.
    valid answers will be rewarded.
    Thanks,
    Satish.

    data p_out like ssfcompop.
    Look at smartform function module,there could be option like
    p_out-tdnoprev = 'X'.
    pass p_out to smartform function module

  • How to show the dialogs in Indesign?

    hi to all,
    I tried these script to show the dialogs but it doesn't work at all!
    $.writeln(app.dialogs.length);
    app.dialogs.everyItem().destroy();
    //for(var i=0;i<app.dialogs.length;i++)
    //     app.dialogs[i].destroy();               //These also i tried//
    var myDialog = app.dialogs.add({name:"Simple Dialog"});
    //Add a dialog column.
    with(myDialog.dialogColumns.add()){
    staticTexts.add({staticLabel:"This is a very simple dialog box."});
    //Show the dialog box.
    var myResult = myDialog.show();
    //If the user clicked OK, display one message;
    //if they clicked Cancel, display a different message.
    if(myResult == true){
    alert("You clicked the OK button.");
    else{
    alert("You clicked the Cancel button.");
    //Remove the dialog box from memory.
    myDialog.destroy();
    i also attaced this script with this forum...
    help me...

    Hi R_Thangaraj,
    your code works very well for me.
    Try to insert the following line at the top of your code to reactivate the user interaction level:
    app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;
    Martin

  • How to suprress the dialog box when we run the URL in the IE

    Hi,
      Is there any way to supress the dialog box which will ask for userid and pwd of the current SAP Box from where its being executed.  Even if we enter the URL of the BSP application in the internet explorer I am getting the popup box for userid and pwd.
    Regards
    Ganesh

    Hi,
    You can supress the dialog box by entering default user ID and password in the application node in your SICF transaction. This is hardcoding sort of method.
    Other way is like this,
    Go to the BSP application SYSTEM. Execute the the page "sso2test.htm " to test the Single Sign on.
    Pass on the User name & password via the URL as follows,
    http://<host>:<port>/sap/bc/bsp/sap/system/sso2test.htm?sap-user=myName&sap-password=myPassword&sap-client=myClient
    If single Sign on is enabled then the BSP page will not ask for a password.
    The same thing you can follow in your own BSP application.
    If SSO is not enabled then you need to go to the RZ10 transaction change the following parameters.
    login/create_sso2_ticket
    login/accept_sso2_ticket
    login/ticket_expiration_time
    Look at this link it would be helpful,
    http://help.sap.com/saphelp_webas620/helpdata/en/5c/b7d53ae8ab9248e10000000a114084/frameset.htm
    Hope this solves the problem. For further quiries pls revert back.
    Regards,
    Ravikiran.C

  • How to print the dialog screen result

    Experts,
    Iam using dynpro and as a result a graph is printed on the screen container. This is my final screen and I want to take a print of that container with graph. so I have activated the print button in the functional keys by selecting the normal application function type.
    my screen output is graph as i said.
    My program code is like below
    PROGRAM  Z_GRP_PRT.
    TYPE-POOLS: GFW.
    DATA PARAMS LIKE PRI_PARAMS.
    DATA: OK_CODE TYPE SY-UCOMM,SAVE_OK LIKE  OK_CODE,
          VALUES TYPE TABLE OF GPRVAL WITH HEADER LINE,
          COLUMN_TEXTS TYPE TABLE OF GPRTXT WITH HEADER LINE.
    DATA: DAYS(1)  TYPE N VALUE 2,
          COUNT(3) TYPE N VALUE 1,
          VALID    TYPE C.
    MODULE STATUS_1000 OUTPUT
    MODULE STATUS_1000 OUTPUT.
      SET PF-STATUS 'YUSR1'.
      REFRESH VALUES.
      REFRESH COLUMN_TEXTS.
      VALUES-ROWTXT = 'Prod1 '.
      VALUES-VAL1 = 1.
      VALUES-VAL2 = 5.
      VALUES-VAL3 = 6.
      VALUES-VAL4 = 7.
      APPEND VALUES.
      VALUES-ROWTXT = 'Prod2 '.
      VALUES-VAL1 = 0.
      VALUES-VAL2 = 5.
      VALUES-VAL3 = 2.
      VALUES-VAL4 = 5.
      APPEND VALUES.
      COLUMN_TEXTS-COLTXT = 'time1'.
      APPEND COLUMN_TEXTS.
      COLUMN_TEXTS-COLTXT = 'time2'.
      APPEND COLUMN_TEXTS.
      COLUMN_TEXTS-COLTXT = 'time3'.
      APPEND COLUMN_TEXTS.
      COLUMN_TEXTS-COLTXT = 'time4'.
      APPEND COLUMN_TEXTS.
      CALL FUNCTION 'GFW_PRES_SHOW'
        EXPORTING
          CONTAINER         = 'CONTAINER'
          PRESENTATION_TYPE = GFW_PRESTYPE_LINES
        TABLES
          VALUES            = VALUES
          COLUMN_TEXTS      = COLUMN_TEXTS
        EXCEPTIONS
          ERROR_OCCURRED    = 1
          OTHERS            = 2.
      IF SY-SUBRC <> 0.
        LEAVE PROGRAM.
      ENDIF.
    ENDMODULE.                 " STATUS_1000  OUTPUT
    MODULE USER_COMMAND_1000 INPUT
    MODULE USER_COMMAND_1000 INPUT.
      OK_CODE = SY-UCOMM.
      SAVE_OK = OK_CODE.
      CASE SAVE_OK.
        WHEN 'EXIT' OR 'BACK'.
          LEAVE PROGRAM.
        WHEN 'PRINT'.
          CALL FUNCTION 'GET_PRINT_PARAMETERS'
            EXPORTING
              DESTINATION      = 'LOCA'
              COPIES               = COUNT
              LIST_NAME         = 'TEST'
              LIST_TEXT           = 'Test NEW-PAGE PRINT ON'
             IMMEDIATELY    = 'X'
              RELEASE            = 'X'
              NEW_LIST_ID       = 'X'
              EXPIRATION         = DAYS
              LINE_SIZE            = 79
              LINE_COUNT        = 23
              LAYOUT               = 'X_PAPER'
              SAP_COVER_PAGE = 'X'
              RECEIVER            = 'SAP*'
              DEPARTMENT      = 'System'
              NO_DIALOG          = ' '
            IMPORTING
              OUT_PARAMETERS = PARAMS
              VALID          = VALID.
          IF VALID = 'X'.
            NEW-PAGE PRINT ON PARAMETERS PARAMS NO DIALOG.
            WRITE / 'First line'.
          ENDIF.
    NOTE : Following code is tried and not printing anything so commented **********
       WHEN 'PRINT'.
         data : lv_program type sy-repid,
                lv_dynnr   type sy-dynnr.
                lv_program =  sy-repid.
                lv_dynnr   = sy-dynnr.
         CALL FUNCTION 'RS_SCRP_PRINT_IN_LIST'
             EXPORTING
               dynnr = lv_dynnr
               Progname = lv_program
               fullscr = 'X'
               EXCEPTIONS
                 cancelled = 1
                 not_found = 0.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_1000  INPUT
    Now, Iam getting a print out like
    SAP logo printed with stars and with all the parameters I have passed to the function module
    Iam not getting the graph as my output. I have tried another code calling 'RS_SCRP_PRINT_IN_LIST'. It is not even giving me any reply. The screen just blinks one time when I press the print button on the screen when I use the commented code function module.
    I just want to print a graph in the screen container. Should I have to convert the screen graph as a list ?
    Then how to do it. Post the complete code of any possible help. Please help me with this and keep my thanks in advance.I don't want to use hard copy.

    please  go through the link   here it was  give the step  .. first you have to create the short cut of the  sap desktop  ......  
    <a href="http://">http://www.sapdevelopment.co.uk/tips/debug/debug_popup.htm</a>
    reward  points  if  it is  usefull ...
    Girish

  • How to override the dialog "Do you want to save" while closing the form?

    HI
    I have two blocks on the form.Master block is based on a view wheres the detail block is populated by a procedure.
    Even if the user doesnot change any record and trying to close the form it is still showing the default "Do you want to save" with three options save,discard,cancel as choices.How can we prevent the form displaying that if the user is closing the form with out any uncommited changes.
    Thanks in advance.

    Read this thread about the affects of post-query and when-validate triggers:
        Message Do you want to change the changes you have made? caused by a lov

  • How to speak the dialog after a script end

    display dialog "File(s) has been unlocked" buttons {"OK"}
    Can we speak this dialog with the display also?

    Not really knowing exactly what your script looks like, I'd probably do something like
    set many_files to false
    if many_files is true then
              set file_word to "Files have"
    else
              set file_word to "File has"
    end if
    set end_string to file_word & " been unlocked."
    say end_string without waiting until completion
    display dialog end_string buttons {"OK"}

  • How to get the latest row from my Logical Table Source?

    Hi everyone,
    I have a SALARY_HISTORY table that holds the Salary Date and the Salary Amount for an employee, as a simple example. In my Business Model, I want to have a Display Folder called "Current Salary" and use the Where Clause restriction to derive the latest salary for each of my employees.
    In standard SQL Plus, I used a nested SQL statement, e.g. "where a.SalaryDate = (select max(b.SalaryDate) from SALARY_HISTORY b where b.employeeid = a.employeeid)".
    Is there anyway in the "Where Clause" filter of the LTS to derive this type of a query?
    I have tried things like "DB".""."SCHEMA"."AL_SALARY_HISTORY"."SalaryDate" = EVALUATE('SELECT_PHYSICAL MAX(SALARY_DATE) FROM "DB".."SCHEMA"."AL_SALARY_HISTORY" WHERE employeeid = %1)', "DB".""."SCHEMA"."AL_SALARY_HISTORY"."employeeid"). And I know I can't use any of the analytic functions in a where clause.
    So how do I go about this other than creating a View in the database or creating a function in the database to give me the maximum salary date for my employee?
    Thanks
    Paul

    Hi Paul,
    You could achieve this requirement using a sub query. Briefly, the steps are
    1. Just create one report with max(salary_date) for each employee.
    2. Create another report with SALARY_DATE included.
    3. Create a filter (Based on another analysis) on this report, as employee is in(Employee of report in step1) AND SALARY_DATE IS IN(SALARY_DATE of report in step1)(this is the max_salary_date for him)
    You could notice that BI Server would send two queries to the backend for this info.
    Hope this helps.
    Thank you,
    Dhar

  • How to get the sound to play in a widget through an LMS?

    Mac operating systerm
    Captivate 6
    I have files that are aggregated. My reporting is set to SCORM 1.2. I know my project is not SCORM compliant. My project plays and transitions when in the LMS however when I get to the widget for my history sections no sound is produced. I have two widgets that do not play sound. Is there something I can do to make the sound play? I've inserted the sound into the widgets as normal.
    Please any advice would be appreciated.
    Thanks,
    Maree

    okay I have version 6.02.325
    Dumb question but I have to ask it...If the frame is paused how do I go in and un-pause it?Also, I may have caused the pause because I inserted a "button" on the slide so that the slide would not advance automatically. As you well know inserting a button and adding it to the top of your timeline making it clear in color sets it up as a pause button. Does that mean if I take that button out my audio will work? And if that makes my audio work will my slide then automatically advance to the next slide?
    So many questions....

  • How to check the time taking to extract rows from source and time load data into destination

    Hi,
    Recently I have started working on Optimizing an SSIS package in 2012. The package reads data from AS 400 server and load into SQL Server table.. No transformations are being used in the package. only ADO.Net Source and OLE DB Destination are using in the
    package.
    The SSIS package is extracting 6500 rows and loading into database per batch. This process is taking 18 seconds. I would like to know out of 18 secs how much time is being used only to extract data from the source and how much time is taking to write the
    data to the database per each batch.
    Any thoughts be greatly appreciated...
    Thanks,
    Venu.

    Hello 
    We need more information regarding your system. If you are using SQL 2014 then you can use the new DMV
    sys.dm_exec_query_profiles which is doing this exactly. Check out this URL: http://msdn.microsoft.com/en-us/library/dn223301.aspx
    While executing your SSIS project you can examine each and every process and get the percentage it already did and all the information regarding it.
      Ronen Ariely
     [Personal Site]    [Blog]    [Facebook]

Maybe you are looking for

  • Using "Saved As..." to create alternate mixes

    I'm not sure if I have this process down pat so I'll state what I think is right and please correct me where I'm not. I want to create 2 separate mixes of the same song. Let's say the first version is called "my song" and I've already saved it as suc

  • Export multiple page indd as individual pdfs.

    I've been racking my brain on this. I have a very long indd that needs to be sent as hirez pdfs to the printer (don't ask me why, I don't know). Each page needs to be it's own pdf. I know I can export each page individually, or export it as one .pdf

  • New iPhone 4 Case

    I am in the market for a new Iphone 4 case because my old Otter Box Defender case has taken a beating after a year of use. I am open to any suggestions and I do not have a specific price range or brand in mind. Any ideas as to what I should get?!

  • Is it possible to turn off CSS and design text with HTML only?

    I'm trying to design text with HTML only ie: Font, Color, Size. The only method I'm aware of is to highlight the text and then go to Insert> Html> Text Objects. That method is tedious and time consuming. I'm not looking for arguments or reasons as to

  • Canon MF4150 Scanning

    Simply, is it possible on Tiger 10.4.9? I've gotten the printer and fax setup, but can't seem to get the scanner recognized...is there any hope? (I bought this printer on an amazing deal, and would hate to have my bubble burst by the inability to sca