• Using view.postScript to open an xe:dialog error

    By Steve Cochrane 1 decade ago

    I can open a dialog using CSJS reliably, using:

     

    XSP.openDialog('#{id:dlgNextOwner}');

     

    In SSJS, the following doesn't trigger anything at all (no errors; nothing!):

    getComponent('dlgNextOwner').show();

    So, I'm trying view.postScript to open the dialog:

     

    view.postScript("XSP.openDialog('#{id:dlgNextOwner}');");

    I get the following error using view.postScript:

     

    TypeError: dlg is undefined
        undefineddojo._scopeArgs = [undefined];

    I have one form as a resource for the entire XPage, which includes the dialog in a custom control.  In the dialog, there is an "OK" button, which uses SSJS to get values from the dialog and update the parent document.

    Any ideas?  If you need more information, please let me know.

    Thanks, in advance!

    Steve in NYC

    "It hurts to be on the cutting edge."

    • UPDATE! Found the problem but can't fix it

      By Steve Cochrane 1 decade ago

      In my long form, there are a lot of different controls.  One of which is Mark Hughes' popular picklist control.  I won't bother asking in that project, since no one really has answered anything there in the longest time.

      Basically, if you are using this picklist, whether the data source is in the XPage or in the panel that contains the picklist, the SSJS dialog.show will NOT fire.  The dialog can open in CSJS, but not a getComponent('dialog').show().

      I asked in StackOverflow, and posted more code there.  I'm hoping that SOMEONE can help me!

      Thanks, in advance!

      Steve in NYC

      • This has been forwarded to XPagesDev

        By Paul Hannan 1 decade ago

         

    • More information needed or has it since been resolved?

      By lisa henry 1 decade ago

      I was going to ask you to forward me on the app itself for more investigation, but I seen on stack overview that you seem to have been able to resolve the issue on your own. Is this a solution satisfactory for what you need?

      Thanks

      Lisa