• 1 reply
  • Latest Post - ‏2013-04-22T14:58:56Z by damorris
445 Posts

Pinned topic Open Dialog Programmatically

‏2013-04-05T13:31:02Z |
I am trying to create a widget in CN to add documents with some custom features add. I have created an empty layout that opens on login. Now I would like to be able to open the my custom dialog that inherits from ecm.widget.dialog.AddContentItemDialog. I would like to automate this deployment of the dialog, in fact this whole layout would just be this dialog.

I would like to know where in the architecture I should put the logic to open a dialog and what that logic should be?

Thank you.
  • damorris
    825 Posts

    Re: Open Dialog Programmatically


    I'm not sure having a layout with a dialog makes sense.  The point of a dialog is to be displayed on top of something in the background.  Launching or showing a dialog really isn't an ICN thing, it's provided generally by JavaScript / HTML.  ICN makes heavy usage of Dojo, and the Dojo dialog widget has methods for hiding / showing the dialog and controlling what kind of dialog this may be.

    Given that you only want to show the add document logic to the user in the layout, I'd probably go away from a dialog and simply use a panel widget.